Question
The number can be represented as in 4-bit 2's complement representation. Which of the following is/are CORRECT 2's complement representation(s) of ?
Official answer and solution
- Official answer
- B and D
- From
- Official GATE 2025 answer key
Solution
Apply sign extension by replicating the most significant (sign) bit 1 into all higher-order bit positions.
In 2's complement representation, extending a negative number (1010 for ) to a wider bit width requires sign extension (replicating the sign bit 1 in all new left positions):
- 8-bit representation:
1111 1010() (B) is CORRECT. - 16-bit representation:
1111 1111 1111 1010(D) is CORRECT.
Options (B), (D)
Confusing 2's complement sign extension with sign-magnitude representation in (A) and (C).
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2025 Computer Science and Information Technology - Session 1 (CS1)
- Question
- 25 of 65
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.