StreakPeaked· Practice

ExamsGATETechnical

Let R1 and R2 be two 4-bit registers that store numbers in 2’s complement form. For the operation R1+R2, which one of the following values of R1 and R2 gives an arithmetic overflow?

  1. R1 = 1011 and R2 = 1110
  2. R1 = 1100 and R2 = 1010
  3. R1 = 0011 and R2 = 0100
  4. R1 = 1001 and R2 = 1111

Correct answer: R1 = 1100 and R2 = 1010

Solution

In option B, 1100 (-4) + 1010 (-6) = -10, outside the 4-bit range [-8,7]; the binary sum 10110 truncates to 0110 (+6), a sign flip from two negatives, which is overflow. The other options stay within range, so B (R1=1100, R2=1010) is the overflow case.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →