store -9 in 2's complement form utilizing two bytes
two bytes = 2*8 = 16 bits -9 This is negative. so, follow these steps to convert this into a 2's complement binary Step 1: Divide 9 successively by 2 until the quotient is 0 > 9/2 = 4, remainder is 1 > 4/2 = 2, remainder is 0 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1001 So, 9 of decimal is 1001 in binary So, 9 in normal binary is 0000000000001001 Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0. 0000000000001001 is flipped to 1111111111110110 Step 3:. Add 1 to above result 1111111111110110 + 1 = 1111111111110111 so, -9 in 2's complement binary is 1111111111110111 Answer: 1111111111110111
Get Answers For Free
Most questions answered within 1 hours.