The number −6 can be represented as 1010 in 4-bit 2’s complement…
2025
The number −6 can be represented as 1010 in 4-bit 2’s complement representation. Which of the following is/are CORRECT 2’s complement representation(s) of −6?
- A.
1000 1010 in 8-bits
- B.
1111 1010 in 8-bit
- C.
1000 0000 0000 1010 in 16-bits
- D.
1111 1111 1111 1010 in 16-bits
Attempted by 443 students.
Show answer & explanation
Correct answer: B, D
Correct 2's complement representations of −6: 11111010 (8-bit) and 1111111111111010 (16-bit).
Start from the 4-bit two's complement 1010, which represents −6. To extend to a larger bit width, replicate the sign bit (the leftmost bit) into the new high-order bits.
8-bit extension: replicate the sign bit 1 to get 11111010. Check by two's-complement: invert to 00000101 and add 1 to get 00000110 (6), so the value is −6.
16-bit extension: replicate the sign bit 1 to get 1111111111111010. Check by two's-complement: invert to 0000000000000101 and add 1 to get 0000000000000110 (6), so the value is −6.
Why the other patterns are wrong: 10001010 (8-bit) and 1000000000001010 (16-bit) do not perform correct sign extension from 1010 and therefore represent different negative values.
A video solution is available for this question — log in and enroll to watch it.