GATE Computer ScienceVery hardGATE CS

A 4-bit shift register Q3 Q2 Q1 Q0 shifts left on every clock: Q3 ← Q2, Q2 ← Q1, Q1 ← Q0 and Q0 ← Q3 ⊕ Q1 (the feedback taps correspond to the polynomial x⁴ + x² + 1, which is not primitive). Considering all 16 possible states, what is the pair (number of distinct cycles in the state diagram, length of the longest cycle)?

  1. A. (4, 6)
  2. B. (4, 15)
  3. C. (2, 12)
  4. D. (3, 6)

Correct answer: A. (4, 6)

Since x⁴ + x² + 1 = (x² + x + 1)², the register splits the 16 states into cycles of lengths 1 (the all-zero state), 3, 6 and 6. So there are 4 cycles and the longest has length 6, not the 15 of a maximal-length LFSR.

More Digital Logic questions

Exams that ask this topic