The GATE Grind

GATE 2026 CS (CS2) – Question 28

Computer Organization and Architecture · Number Representation and Floating Point Arithmetic · 1 mark · Multiple select

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

  1. $N_1+N_2$
  2. $N_2+N_3$
  3. $N_3-N_4$
  4. $N_1+N_4$

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) $N_2+N_3$; (D) $N_1+N_4$

Explanation

In 4-bit two's complement, $N_1=1011=-5$, $N_2=1101=-3$, $N_3=1010=-6$, and $N_4=1001=-7$. The representable range is from $-8$ to $7$. Now, $N_1+N_2=-8$, which is representable, so no overflow. $N_2+N_3=-9$, which is outside the range, so overflow occurs. $N_3-N_4=-6-(-7)=1$, which is representable. $N_1+N_4=-12$, which is outside the range, so overflow occurs. Therefore, (B) and (D) are correct.