GATE Computer ScienceVery hardGATE CS

A 5-bit Johnson (twisted-ring) counter shifts right with Q4 ← NOT Q0 (and Q3 ← Q4, Q2 ← Q3, Q1 ← Q2, Q0 ← Q1) and has no self-correction logic. Looking at all 32 possible states, what is the pair (total number of distinct cycles in the state diagram, length of the shortest cycle)?

  1. A. (3, 10)
  2. B. (4, 5)
  3. C. (4, 2)
  4. D. (2, 10)

Correct answer: C. (4, 2)

The 32 states split into three 10-state cycles (one is the valid Johnson sequence) and one 2-state cycle 01010 ↔ 10101. A counter that powers up in any other cycle never reaches the valid sequence, so there are 4 cycles and the shortest has length 2.

More Digital Logic questions

Exams that ask this topic