GATE Computer ScienceVery hardGATE CS (PYQ pattern)

A 4-bit register Q3Q2Q1Q0 shifts right every clock; the new value of Q3 is Q3 ⊕ Q1 (Q2 takes the old Q3, and so on). Of the 16 possible initial states, how many eventually reach the all-zero state?

  1. A. 1
  2. B. 2
  3. C. 3
  4. D. 4

Correct answer: B. 2

0001 shifts to 0000 (Q0 is simply dropped), so both 0000 and 0001 end in zero. The 14 other states all drain into a 7-state cycle, so this is not a maximal-length generator.

More Digital Logic questions

Exams that ask this topic