Please show step by step
What is the binary value in two's complement representation for -2310
If you want this in 8-bit 2's complement: ------------------------------------------- This is negative. so, follow these steps to convert this into a 2's complement binary Step 1: Divide 23 successively by 2 until the quotient is 0 23/2 = 11, remainder is 1 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 10111 Adding 3 zeros on left hand side of this number to make this of length 8 So, 23 in normal binary is 00010111 Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0. 00010111 is flipped to 11101000 Step 3:. Add 1 to above result 11101000 + 1 = 11101001 so, -23 in 2's complement binary is 11101001 If you want this in 16-bit 2's complement: ------------------------------------------- This is negative. so, follow these steps to convert this into a 2's complement binary Step 1: Divide 23 successively by 2 until the quotient is 0 23/2 = 11, remainder is 1 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 10111 Adding 11 zeros on left hand side of this number to make this of length 16 So, 23 in normal binary is 0000000000010111 Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0. 0000000000010111 is flipped to 1111111111101000 Step 3:. Add 1 to above result 1111111111101000 + 1 = 1111111111101001 so, -23 in 2's complement binary is 1111111111101001
Get Answers For Free
Most questions answered within 1 hours.