Question:

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

Show Hint

Decode each 4-bit two's complement number to decimal, then check whether the true sum or difference lies inside the representable range $[-8, 7]$; if it falls outside, overflow has occurred.
Updated On: Jul 7, 2026
  • 𝑁1 + 𝑁2
  • 𝑁2 + 𝑁3
  • 𝑁3 βˆ’π‘4
  • 𝑁1 + 𝑁4
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B, D

Solution and Explanation

We are working with 4-bit two's complement numbers. First, decode each given binary number to its signed decimal value.

Step 1: Decode the numbers. \(N_1 = 1011\): value \(= -8+0+2+1 = -5\). \(N_2 = 1101\): value \(= -8+4+0+1 = -3\). \(N_3 = 1010\): value \(= -8+0+2+0 = -6\). \(N_4 = 1001\): value \(= -8+0+0+1 = -7\).

Step 2: Recall the overflow rule. In an \(n\)-bit two's complement adder, overflow occurs exactly when the carry into the sign bit differs from the carry out of the sign bit.

Step 3: Check \(N_1 + N_2\). \(-5 + (-3) = -8\), which lies inside \([-8,7]\). Adding \(1011 + 1101\): carry into sign bit \(=1\), carry out of sign bit \(=1\), so no overflow. Result bits \(1000 = -8\), which is correct.

Step 4: Check \(N_2 + N_3\). \(-3 + (-6) = -9\), outside \([-8,7]\) - overflow expected. Adding \(1101+1010\): carry into sign bit \(=0\), carry out of sign bit \(=1\) - these differ, so overflow occurs.

Step 5: Check \(N_3 - N_4\). \(-6 - (-7) = 1\), inside \([-8,7]\). Subtraction becomes \(N_3 + (\text{two's complement of } N_4)\); two's complement of \(1001\) is \(0111 = 7\). Adding \(1010+0111\): carry into sign bit \(=1\), carry out of sign bit \(=1\) - equal, so no overflow. Result bits \(0001 = 1\), correct.

Step 6: Check \(N_1 + N_4\). \(-5 + (-7) = -12\), outside \([-8,7]\) - overflow expected. Adding \(1011+1001\): carry into sign bit \(=0\), carry out of sign bit \(=1\) - these differ, so overflow occurs.

Final Answer: Overflow occurs in \(N_2+N_3\) and \(N_1+N_4\). \(\boxed{\text{Options B and D}}\)

Was this answer helpful?
0
0

Top GATE CS Computer Science and IT Engineering Questions

View More Questions

Top GATE CS Computer Organization and Architecture Questions

View More Questions