The GATE Grind

GATE 2022 CS – Question 18

Digital Logic · Number Representation and Arithmetic · 1 mark · Multiple choice

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

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.