IAE Academy

GATE 2026 CS1 Q.22: solution and answer

GATE 2026 · CS1Q.22 · 1 mark · MSQ

Consider the 8-bit signed integers , and represented using the sign-magnitude form. The binary representations of and are as follows:

: 10110100 : 01001100

Which of the following operations to compute result(s) in an arithmetic overflow?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

See the question in the paper

Answer and solution

ANSWER

Options B and C overflow: and both fall outside the 8-bit sign-magnitude range .

Official answer: B, CSource: Official answer key, GATE 2026 CS1 (IIT Guwahati)

  1. Sign-magnitude with 8 bits uses 1 sign bit and 7 magnitude bits, so the representable range is . Any result whose magnitude is 128 or more overflows.

  2. : the sign bit is 1 (negative) and the magnitude is , so .

  3. : the sign bit is 0 (positive) and the magnitude is , so .

  4. (A) . This is within range, so there is no overflow.

  5. (B) . This is below , so it overflows.

  6. (C) . This is above , so it overflows.

  7. (D) . This is within range, so there is no overflow.

  8. Overflow occurs for options (B) and (C).

KEY IDEA

Sign-magnitude with 8 bits has only 7 magnitude bits, so the range is to . Decode X and Y to decimal and check whether each result's magnitude exceeds 127.

WATCH OUT FOR

Using the two's complement range makes look representable and drops option B. In sign-magnitude, has no encoding. Another slip is reading X as instead of sign bit plus magnitude.

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

More Number systems questions