convert -45 to 9-bit 2's complement.
This is negative. so, follow these steps to convert this into a 2's complement binary Step 1: Divide 45 successively by 2 until the quotient is 0 45/2 = 22, remainder is 1 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 101101 Adding 3 zeros on left hand side of this number to make this of length 9 So, 45 in normal binary is 000101101 Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0. 000101101 is flipped to 111010010 Step 3:. Add 1 to above result 111010010 + 1 = 111010011 so, -45 in 2's complement binary is 111010011 Answer: 111010011
Get Answers For Free
Most questions answered within 1 hours.