Question

In: Computer Science

Interpret these signed 8-bit sequences with each type of signed/unsigned encoding. Remember the bits are arbitrary!...

Interpret these signed 8-bit sequences with each type of signed/unsigned encoding. Remember the bits are arbitrary! They can be interpreted in many different ways.

C.1: Complete the following table using decimal (base-10) numbers. The first line is already completed for you
bit sequence unsigned sign-magnitude 1s’ complement 2’s complement
00000101 +5 +5 +5 +5
11110001 ? ? ? ?
01010011 ? ? ? ?
10000000 ? ? ? ?
11111111 ? ? ? ?

Solutions

Expert Solution

a) 00000101
Unsigned:
Converting 00000101 to decimal
00000101
=> 0x2^7+0x2^6+0x2^5+0x2^4+0x2^3+1x2^2+0x2^1+1x2^0
=> 0x128+0x64+0x32+0x16+0x8+1x4+0x2+1x1
=> 0+0+0+0+0+4+0+1
=> 5
Answer: 5

sign-magnitude:
Left most bit is 0. so, it's positive.
Now, let's convert rest of the bits 0000101 to decimal
Converting 0000101 to decimal
0000101
=> 0x2^6+0x2^5+0x2^4+0x2^3+1x2^2+0x2^1+1x2^0
=> 0x64+0x32+0x16+0x8+1x4+0x2+1x1
=> 0+0+0+0+4+0+1
=> 5
so, 00000101 from sign-magnitude to decimal is 5
Answer: 5

1's complement:
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
Converting 101 to decimal
101
=> 1x2^2+0x2^1+1x2^0
=> 1x4+0x2+1x1
=> 4+0+1
=> 5
Answer: 5

2's complement:
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
Converting 101 to decimal
101
=> 1x2^2+0x2^1+1x2^0
=> 1x4+0x2+1x1
=> 4+0+1
=> 5
Answer: 5


b) 11110001
Unsigned:
Converting 11110001 to decimal
11110001
=> 1x2^7+1x2^6+1x2^5+1x2^4+0x2^3+0x2^2+0x2^1+1x2^0
=> 1x128+1x64+1x32+1x16+0x8+0x4+0x2+1x1
=> 128+64+32+16+0+0+0+1
=> 241
Answer: 241

sign-magnitude:
Left most bit is 1. so, it's negative.
Now, let's convert rest of the bits 1110001 to decimal
Converting 1110001 to decimal
1110001
=> 1x2^6+1x2^5+1x2^4+0x2^3+0x2^2+0x2^1+1x2^0
=> 1x64+1x32+1x16+0x8+0x4+0x2+1x1
=> 64+32+16+0+0+0+1
=> 113
so, 11110001 from sign-magnitude to decimal is -113
Answer: -113

1's complement:
since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   11110001 is flipped to 00001110
II. Now convert this result to decimal value
Converting 1110 to decimal
1110
=> 1x2^3+1x2^2+1x2^1+0x2^0
=> 1x8+1x4+1x2+0x1
=> 8+4+2+0
=> 14
Answer: -14

2's complement:
since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   11110001 is flipped to 00001110
II. Add 1 to above result
00001110 + 1 = 00001111
III. Now convert this result to decimal value
Converting 1111 to decimal
1111
=> 1x2^3+1x2^2+1x2^1+1x2^0
=> 1x8+1x4+1x2+1x1
=> 8+4+2+1
=> 15
Answer: -15


c) 01010011
Unsigned:
Converting 01010011 to decimal
01010011
=> 0x2^7+1x2^6+0x2^5+1x2^4+0x2^3+0x2^2+1x2^1+1x2^0
=> 0x128+1x64+0x32+1x16+0x8+0x4+1x2+1x1
=> 0+64+0+16+0+0+2+1
=> 83
Answer: 83

sign-magnitude:
Left most bit is 0. so, it's positive.
Now, let's convert rest of the bits 1010011 to decimal
Converting 1010011 to decimal
1010011
=> 1x2^6+0x2^5+1x2^4+0x2^3+0x2^2+1x2^1+1x2^0
=> 1x64+0x32+1x16+0x8+0x4+1x2+1x1
=> 64+0+16+0+0+2+1
=> 83
so, 01010011 from sign-magnitude to decimal is 83
Answer: 83

1's complement:
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
Converting 1010011 to decimal
1010011
=> 1x2^6+0x2^5+1x2^4+0x2^3+0x2^2+1x2^1+1x2^0
=> 1x64+0x32+1x16+0x8+0x4+1x2+1x1
=> 64+0+16+0+0+2+1
=> 83
Answer: 83

2's complement:
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
Converting 1010011 to decimal
1010011
=> 1x2^6+0x2^5+1x2^4+0x2^3+0x2^2+1x2^1+1x2^0
=> 1x64+0x32+1x16+0x8+0x4+1x2+1x1
=> 64+0+16+0+0+2+1
=> 83
Answer: 83


d) 10000000
Unsigned:
Converting 10000000 to decimal
10000000
=> 1x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0
=> 1x128+0x64+0x32+0x16+0x8+0x4+0x2+0x1
=> 128+0+0+0+0+0+0+0
=> 128
Answer: 128

sign-magnitude:
Left most bit is 1. so, it's negative.
Now, let's convert rest of the bits 0000000 to decimal
Converting 0000000 to decimal
0000000
=> 0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0
=> 0x64+0x32+0x16+0x8+0x4+0x2+0x1
=> 0+0+0+0+0+0+0
=> 0
so, 10000000 from sign-magnitude to decimal is 0
Answer: 0

1's complement:
since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   10000000 is flipped to 01111111
II. Now convert this result to decimal value
Converting 1111111 to decimal
1111111
=> 1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0
=> 1x64+1x32+1x16+1x8+1x4+1x2+1x1
=> 64+32+16+8+4+2+1
=> 127
Answer: -127

2's complement:
since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   10000000 is flipped to 01111111
II. Add 1 to above result
01111111 + 1 = 10000000
III. Now convert this result to decimal value
Converting 10000000 to decimal
10000000
=> 1x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0
=> 1x128+0x64+0x32+0x16+0x8+0x4+0x2+0x1
=> 128+0+0+0+0+0+0+0
=> 128
Answer: -128


e) 11111111
Unsigned:
Converting 11111111 to decimal
11111111
=> 1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0
=> 1x128+1x64+1x32+1x16+1x8+1x4+1x2+1x1
=> 128+64+32+16+8+4+2+1
=> 255
Answer: 255

sign-magnitude:
Left most bit is 1. so, it's negative.
Now, let's convert rest of the bits 1111111 to decimal
Converting 1111111 to decimal
1111111
=> 1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0
=> 1x64+1x32+1x16+1x8+1x4+1x2+1x1
=> 64+32+16+8+4+2+1
=> 127
so, 11111111 from sign-magnitude to decimal is -127
Answer: -127

1's complement:
since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   11111111 is flipped to 00000000
II. Now convert this result to decimal value
Converting to decimal

=>
=>
=>
=> 0
Answer: 0

2's complement:
since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   11111111 is flipped to 00000000
II. Add 1 to above result
00000000 + 1 = 00000001
III. Now convert this result to decimal value
Converting 1 to decimal
1
=> 1x2^0
=> 1x1
=> 1
=> 1
Answer: -1



Related Solutions

Represent -60 in binary using 8-bit signed magnitude. Add the following unsigned 8 bit binary numbers...
Represent -60 in binary using 8-bit signed magnitude. Add the following unsigned 8 bit binary numbers as shown. 01110101 + 00111011 Add the following unsigned 8 bit binary numbers as shown. 01000100 + 10111011
a. Encoding the decimal number 2.25 into an 8-bit binary. Suppose k=4 exponent bits, n=3 fraction...
a. Encoding the decimal number 2.25 into an 8-bit binary. Suppose k=4 exponent bits, n=3 fraction bits, and the bias is 7. What’s the corresponding binary representation for 2.25? Show your work. b. What’s the value in decimal if this is an 8-bit floating point number? Suppose k=4 exponent bits, n=3 fraction bits, and the bias is 7 of 10111001
Of all bit sequences of length 8, an 8-bit sequence is selected at random. Assuming that...
Of all bit sequences of length 8, an 8-bit sequence is selected at random. Assuming that the probability of a bit being 0 is equal to that being 1, determine the probability that the selected bit sequence starts with a 1 or ends with the two bits 00.
2. Given variables A, B and C; each holding an 8-bit unsigned number. Write an AVR...
2. Given variables A, B and C; each holding an 8-bit unsigned number. Write an AVR assembly program to find the average of A to C, placing the result into variable F. -embedded system-
A 12-bit Hamming code word containing 8 data bits and 4 parity bits is read from...
A 12-bit Hamming code word containing 8 data bits and 4 parity bits is read from memory. What was the original 12-bit word written into memory, if the 12-bit word read were the following? (i) 000011101010 (ii) 101110000110 (iii) 101111110100
IEEE 754 format of 32-bit floating-point is as follows. 1 8 (bits) 23 (bits) What’s stored...
IEEE 754 format of 32-bit floating-point is as follows. 1 8 (bits) 23 (bits) What’s stored in each region? What’s the bias value and how to get it? For decimal fraction: – 0.625, please represent it as given format (Note: you must show the specific procedure/stepsin order to get full credits. If you only present final result directly, you will only get half of the credits even if it is correct.).  
Make a schema for a memory size of 65536 words per 8 bits. Use 8k  by 8-bit...
Make a schema for a memory size of 65536 words per 8 bits. Use 8k  by 8-bit 2764 memory a) with a single decoder 388 and inverters. b) Use a decoder 2 4 and inverters? Help?   How to implement?
Suppose 8 bits are used to store signed integers. The largest value that can be represented...
Suppose 8 bits are used to store signed integers. The largest value that can be represented is 0111 1111. What is the decimal value of that number? 127 128 177 178 2.Suppose a 6-bit storage unit is used to store unsigned integers. What is the binary representation of the decimal number 67? 01000011 1000011 010000 000011
Convert the following statement into the 8-bit unsigned binary ASCII representation: Bob’s laptop receives the frame...
Convert the following statement into the 8-bit unsigned binary ASCII representation: Bob’s laptop receives the frame containing the ARP reply message. First, convert each character into it's ASCII equivalents. Then, convert to a Binary number. For example: Bob's -> 066 111 098 039 115 -> 01000010 01101111 01100010 00100111 01110011 Remember, each Binary number has to be 8-bits.
Consider a binary channel transmitting bits independently. Each bit is demodulated with a 0 corresponding to...
Consider a binary channel transmitting bits independently. Each bit is demodulated with a 0 corresponding to 0 volts and a 1 corresponding to 5 volts. Thus, the received random variable v is normally distributed with variance σ2 = 1 and mean μ = 0 or μ = 5. The demodulated voltage v is compared to a threshold τ to decide whether a bit is a 0 or 1, i.e., decide that a 1 was sent if v > τ and...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT