Skip to main content

GATE CSE 2026Digital Logic › Number Systems & RepresentationVerified

GATE CSE 2026 PYQ: In a system, numbers are represented using 4 4 4 -bit two's complement form. Consider four numbers N 1 =…

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

  1. A
    N1+N2N 1+N 2
  2. B
    N2+N3N 2+N 3
    Correct answer
  3. C
    N3−N4N 3-N 4
  4. D
    N1+N4N 1+N 4
    Correct answer

Answer

(B, D) N 2 + N 3 N 2+N 3 N 2 + N 3; N 1 + N 4 N 1+N 4 N 1 + N 4

Approach

The four operands are 4-bit two's complement numbers, so each represents a value in the range [-8, +7]. Decoding them to decimal, performing each operation, and checking whether the true mathematical result still lies within [-8, +7] immediately reveals overflow. The same conclusion follows from the carry-in/carry-out rule: overflow occurs exactly when the carry into the MSB differs from the carry out of the MSB (equivalently, when adding two same-sign operands yields an opposite-sign result).

Only the operations whose exact mathematical results fall outside the 4-bit two's complement range [-8, +7] overflow. Options B (-9) and D (-12) exceed this range, while option A (-8) sits exactly at the boundary and option C (+1) is safely inside; the carry-in/carry-out XOR test independently confirms B and D as the overflow cases.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.