1. (21 points) a) (3 points) Consider an 8-bit binary system. Give the 8-bit bin
ID: 3870062 • Letter: 1
Question
1. (21 points) a) (3 points) Consider an 8-bit binary system. Give the 8-bit binary representation for the complement of the following numbers. i) 0110 0101 ii) 1010 0001 ii 1110 0011 b) (6 points) Suppose the bit strings in a) representing unsigned binary numbers. Convert the numbers and their complement to decimal numbers. c) (6 points) Suppose the bit strings in a) representing two's complement numbers. Convert the numbers and their complement to decimal numbers. d) (6 points) Suppose the bit strings in a) representing signed magnitude numbers. Convert the numbers and their complement to decimal numbers.Explanation / Answer
1. Complement 0 becomes 1 and 1 becomes 0
a) 8-bit binary representation for the complement
i ) 0110 0101
complement = 1001 1010
ii) 1010 0001
complement = 0101 1110
iii) 1110 0011
complement = 0001 1100
b)Unsigned binary numbers ( no sign bit)
i) number = (0110 0101)2 = 26 + 25 + 22 + 20 = 64+32+4+1 = (101)10
complement = (1001 1010)2 = 27 + 24 + 23 + 21 = 128 +16 + 8+2 = (154)10
ii) number = 10101 0001 = 128 +32 + 1 = (161)10
complement = 0101 1110 = 64+16+8+4+2 = (94)10
iii) number = 1110 0011 = 128+64+32+2+1 = 227
complement = 00011100 = 16+8+4 = (28)10
c) two's complement numbers(represents negative numbers , two's complement number needs to reverse back to number by taking its 2's complement and adding negative sign)
i) number = 0110 0101 , its 1's complement = 1001 1010 its 2's complement = 1's complement + 1
= 1001 1011 = (-155)10
complement = 1001 1010 ,its 1's complement = 0110 0101 , 2's complement = 01100110 = -102 in decimal
ii) number = 1010 0001 , its complement = 0101 1110 , its 2's complement = 0101 1111 = (-95)10
complement = 0101 1110 , 1's complement = 1010 0001, 2's complement = 1010 0010 = (-162)10
iii) number = 1110 0011, 1's complement = 00011100, 2's complement = 0001 1101 = (-29)10
complement = 0001 1100 , 1's complement = 1110 0011, 2's complement = 1110 0100 = (228)10
d) Signed magnitude number (left most bit is sign bit 0 is for positive number and 1 is for negative number)
i) 0) 110 0101 = (+101)10
ii) 1)010 0001 = (-33)10
iii) 1)110 0011 = (-99)10
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.