GATE Computer ScienceVery hardGATE CSE · NIELIT

A 4-bit binary adder adds unsigned operands A, B (0–15) and a carry-in Cin ∈ {0,1}. For how many of the 512 input combinations is the carry-out equal to 1?

  1. A. 255
  2. B. 240
  3. C. 256
  4. D. 272

Correct answer: C. 256

Carry-out occurs when A+B+Cin ≥ 16: for Cin = 0 there are 120 pairs and for Cin = 1 there are 136 pairs, a total of 256.

More Digital Logic questions

Exams that ask this topic