GATE 2022 CS – Question 18
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?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (B) R1 = 1100 and R2 = 1010
Explanation
1100 is −4 and 1010 is −6, and their sum −10 is below the 4-bit range of −8 to 7. The sum bits 0110 have a positive sign, so this is overflow. The other options stay within range.