GATE Computer ScienceHardGATE CS (PYQ pattern)

An 8-bit ALU adds the two's complement numbers 0x9C and 0xB5. After the addition the carry (C), overflow (V) and sign (N) flags are respectively:

  1. A. C = 1, V = 1, N = 0
  2. B. C = 1, V = 0, N = 1
  3. C. C = 0, V = 1, N = 0
  4. D. C = 1, V = 0, N = 0

Correct answer: A. C = 1, V = 1, N = 0

0x9C + 0xB5 = 0x151, so the 8-bit result is 0x51 with a carry out (C = 1). Both operands are negative (−100 and −75) but the result 0x51 is positive, so signed overflow occurs (V = 1) and N = 0.

More Computer Organization and Architecture questions

Exams that ask this topic