Question

In a system, numbers are represented using 4-bit two's complement form. Consider four numbers N1=1011N_1 = 1011, N2=1101N_2 = 1101, N3=1010N_3 = 1010 and N4=1001N_4 = 1001 in the system. Which of the following operations will result in arithmetic overflow?

Choose every correct option
Official answer and solution
Official answer
B and D
From
Official GATE 2026 answer key

Solution

Convert each 4-bit two's complement number to decimal and check which results fall outside the representable range [−8,+7][-8, +7].

The representable range of 4-bit two's complement integers is [−8,+7][-8, +7]. Converting the four operands to decimal:

  • N1=10112=−8+3=−5N_1 = 1011_2 = -8 + 3 = -5
  • N2=11012=−8+5=−3N_2 = 1101_2 = -8 + 5 = -3
  • N3=10102=−8+2=−6N_3 = 1010_2 = -8 + 2 = -6
  • N4=10012=−8+1=−7N_4 = 1001_2 = -8 + 1 = -7

Checking each operation:

  • (A) N1+N2=−5+(−3)=−8∈[−8,7]N_1 + N_2 = -5 + (-3) = -8 \in [-8, 7] (no overflow).
  • (B) N2+N3=−3+(−6)=−9<−8N_2 + N_3 = -3 + (-6) = -9 < -8 (overflow).
  • (C) N3−N4=−6−(−7)=+1∈[−8,7]N_3 - N_4 = -6 - (-7) = +1 \in [-8, 7] (no overflow).
  • (D) N1+N4=−5+(−7)=−12<−8N_1 + N_4 = -5 + (-7) = -12 < -8 (overflow).
Final answer

Options (B), (D)

Common trap

Treating −8-8 (100021000_2) in option (A) as an overflow when −8-8 is valid in 4-bit two's complement.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2026 Computer Science and Information Technology - Session 2 (CS2)
Question
28 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.