IAE Academy

GATE 2025 IN Q.18: solution and answer

GATE 2025 · INQ.18 · 1 mark · MCQ

The 4-bit signed 2's complement form of is

  1. (A)

  2. (B)

  3. (C)

  4. (D)

See the question in the paper

Answer and solution

ANSWER

In 4 bits, . Read as a signed 2's complement number, is , so the answer is (A). The true sum overflows the range to .

Official answer: ASource: Official answer key, GATE 2025 IN (IIT Roorkee)

  1. Write each operand in 4-bit 2's complement: . A 4-bit 2's complement number ranges from to , that is, from to .

  2. Add in binary and keep only 4 bits: There is no carry out of the MSB, so the 4-bit result is .

  3. Overflow check: both operands are positive (sign bit 0), but the result has sign bit 1, so the addition has overflowed. The true sum, , lies outside the range to .

  4. Read as a signed 2's complement number. The MSB has weight :

  5. Cross-check by taking the 2's complement of : inverting every bit gives , and adding 1 gives . So stands for .

  6. The 4-bit register therefore holds , which is option (A).

KEY IDEA

An -bit 2's complement register can hold only values from to . When two positive numbers add up to more than , the sum wraps around. The stored pattern is the true sum minus , here . You can spot the overflow because two operands with sign bit 0 give a result with sign bit 1.

WATCH OUT FOR

Reading as unsigned and answering , which is not an option, or treating it as sign-magnitude and getting . A related slip is choosing because it is the most negative 4-bit value. Some students also flip the bits and forget to add 1, getting and choosing (C). The MSB carries weight , so .

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

More Number systems questions