GATE Computer ScienceVery hardGATE CS (PYQ pattern)

How many 8-bit patterns have no two adjacent 1 bits and an even number of 1 bits?

  1. A. 28
  2. B. 27
  3. C. 55
  4. D. 64

Correct answer: B. 27

The number of k-subsets of 8 positions with no two adjacent is C(9 − k, k). For even k: k = 0 gives 1, k = 2 gives C(7,2) = 21, k = 4 gives C(5,4) = 5, total 27 (the odd weights give 28, so 55 in all).

More Digital Logic questions

Exams that ask this topic