GATE 2025 CS (CS1) – Question 25
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$?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (B) 1111 1010 in 8-bits; (D) 1111 1111 1111 1010 in 16-bits
Explanation
Sign extension replicates the sign bit. -6 is 1111 1010 in 8 bits and 1111 1111 1111 1010 in 16 bits. Padding with 1000... gives a different value.