GATE Computer ScienceHardGATE CS (PYQ pattern)

An 8-bit adder adds two 8-bit operands a and b with no carry-in, producing the carry-out C8 and the signed (two's complement) overflow flag V. Over all 2¹⁶ operand pairs, for how many is C8 = 1 while V = 0?

  1. A. 32640
  2. B. 16384
  3. C. 8128
  4. D. 24384

Correct answer: D. 24384

C8 = 1 for 32640 pairs. Overflow with carry-out 1 is the negative-overflow case (both operands negative, wrapped sum non-negative): 8256 pairs. So 32640 − 8256 = 24384.

More Digital Logic questions

Exams that ask this topic