In: Computer Science
Show the decimal integer 44 in 7-bit sign magnitude, one's complement, two's complement and excess-63 respectively in the given order, separated by comma.
Answer: -------- 0101100,0101100,0101100,1101011 44 ----- Since this is a positive number. we can directly convert this into binary Divide 44 successively by 2 until the quotient is 0 > 44/2 = 22, remainder is 0 > 22/2 = 11, remainder is 0 > 11/2 = 5, remainder is 1 > 5/2 = 2, remainder is 1 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 101100 So, 44 of decimal is 101100 in binary Adding 1 zero(s) on left hand side of this number to make this of length 7 So, 44 in normal binary format is 0101100 ==================================== || 1's complement: 0101100 || || 2's complement: 0101100 || || sign-magnitude: 0101100 || ==================================== for excess-63: ----------------- add 63 to 44 63+44 = 107 107 in 7-bit binary is Divide 107 successively by 2 until the quotient is 0 > 107/2 = 53, remainder is 1 > 53/2 = 26, remainder is 1 > 26/2 = 13, remainder is 0 > 13/2 = 6, remainder is 1 > 6/2 = 3, remainder is 0 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1101011 So, 107 of decimal is 1101011 in binary