GATE Computer ScienceVery hardGATE CS (PYQ pattern)

A 5-bit right-shifting register has a new Q4 equal to Q4 ⊕ Q0. What is the length of its longest cycle of states?

  1. A. 31
  2. B. 15
  3. C. 7
  4. D. 21

Correct answer: D. 21

The feedback polynomial x⁵ + x⁴ + 1 factors as (x² + x + 1)(x³ + x + 1), so it is not primitive. The state space splits into cycles of lengths 1, 3, 7 and 21, not a 31-cycle.

More Digital Logic questions

Exams that ask this topic