GATE Computer ScienceHardGATE CS

A 4-bit shift-right register Q3 Q2 Q1 Q0 has Q2 ← Q3, Q1 ← Q2, Q0 ← Q1 and Q3 ← NOR(Q3, Q2, Q1). Its state diagram has the single 4-state cycle 1000 → 0100 → 0010 → 0001. Starting from the worst possible power-up state, how many clock pulses are needed before the counter first enters this cycle?

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

Correct answer: B. 3

Feeding a 1 into Q3 only when Q3, Q2 and Q1 are all 0 makes every state drain into the cycle. The slowest states are 1100, 1101, 1110 and 1111: for 1111 the sequence is 1111 → 0111 → 0011 → 0001, which is on the cycle after 3 clocks.

More Digital Logic questions

Exams that ask this topic