In a system, numbers are represented using 4-bit two's complement form. Consider four numbers and in the system. Which of the following operations will result in arithmetic overflow?
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 =…
- A
- BCorrect answer
- C
- DCorrect 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.