IAE Academy

GATE 2025 CS1 Q.25: solution and answer

GATE 2025 · CS1Q.25 · 1 mark · MSQ

The number 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 ?

  1. (A)

    1000 1010 in 8-bits

  2. (B)

    1111 1010 in 8-bits

  3. (C)

    1000 0000 0000 1010 in 16-bits

  4. (D)

    1111 1111 1111 1010 in 16-bits

See the question in the paper

Answer and solution

ANSWER

The correct options are (B) and (D).

Official answer: B, DSource: Official answer key, GATE 2025 CS1 (IIT Roorkee)

  1. An -bit 2's complement number has value . Check the 4-bit form: .

  2. To widen a 2's complement number, copy the sign bit into the new high bits (sign extension). The value does not change.

  3. The sign bit is 1, so the 8-bit form is and the 16-bit form is .

  4. Check (A): .

  5. Check (B): . Correct.

  6. Check (C): .

  7. Check (D): . Correct.

  8. So the correct options are (B) and (D).

KEY IDEA

Widening a 2's complement number is done by sign extension: copy the sign bit into every new high-order position. The value stays the same.

WATCH OUT FOR

Padding with zeros on the left, or keeping the sign bit as the leading bit and padding zeros after it. That gives or , which are large negative numbers, not .

From the GATE 2025 CS1 paper. Every question of this paper · Download the full paper · All 18 Number systems questions, with notes

More Number systems questions