8. (12 points) Suppose numbers were being represented with 6 bits a. How many un
ID: 3750552 • Letter: 8
Question
8. (12 points) Suppose numbers were being represented with 6 bits a. How many unique values could be represented? b. I the representation was unsigned, what would be the smallest possible value (show in binary and decimal)? 2. e representation was unsigned, what would be the largest possible value (show in binary and decimal)? 3 d. If the representation was signed (wo's complement), what would be the smallest possible value (show in binary and decimal)? e. If the representation was signed (two's complement), what would be the largest possible value ( in binary and decimal)? 63 f. Show how -23 would be represented using a 6-bit two's complement notation.Explanation / Answer
Explaination:
Generally, if number of bits is n, then if unsigned representation, max-value: 2n-1 (111...11(n times)) and min-value: 0 (000...00(n times)). if in case of signed representation where the most significant bit(MSB) represent sign of the number being represnted(0 for non-negative value and 1 for negative value) max-value:2n-1-1 (111...111(n-1 times)) and min-value: -2n-1 (100...00(n-1 times))
for example if number of bits is 3. Then
possible, unsigned max value is: 7 and its binary equivalent is 111
unsigned min value is: 0 and its binary equivalent is 000
signed max value is: 3 and its binary equivalent is 011, here MSB 0 here represent the value is a positive value as we have specifically mentioned that it is going to a signed value
signed min value is: -4 and its binay equivalent is 100, here MSB 1 here represent the value is a negitive value as we have specifically mentioned that it is going to a signed value
Answer:
a. As 6 digit number 26 which is 64 distinct numbers can be expressed [0 to 63] in case of unsigned, [-32 to 31] in case of signed.
b.As unsigned which is used only to express non negitive values. Hence MSB's magnitude can also be considered. Therefore, the possible smallest value is 0 and binary equivalent is 000000.
c.As unsigned which is used only to express non negitive values. The possible Biggest value is 63 and binary equivalent is 111111
d.As signed, maginitude of MSB cannot be included and this is reserved. Hence smallest possible value is -32 and binary equivalent is 100000
e.As signed, maginitude of MSB cannot be included and this is reserved.Hence smallest possible value is 31 and binary equivalent is 111111
f.To find a two's complement value, first find the one's complement of absolute value of the given number and add one to it.
Hence the absolute value of -23 is 23.
The binary equivalent is 010111, and its one's complement can be found by replacing 1 in place of 0 and 0 in place of 1, i.e 101000 for 23. After adding 1 to that final value will be 101001. Hene binary reperesentation of two's complement is 101001.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.