Skip to content
BetterDL

Ring counter

Also called: one-hot ring counter, circulating register, ring shift counter, straight ring counter

A shift register whose last output feeds its serial input, started with a single 1 so that the 1 circulates. An n-bit ring counter has n states.

A ring counter is a shift register that rotates forever. The last flip-flop's output is wired back to the serial input (for a shift-right register, SI = Q0). It is started with exactly one 1, which then travels round the ring:

1000 → 0100 → 0010 → 0001 → 1000 …

Key facts:

  • An n-bit ring counter has n states, so it is a mod-n counter using n flip-flops.
  • Exactly one bit is 1 in every state. That is one-hot encoding.
  • It must be initialized, usually by presetting one flip-flop and clearing the rest at power-up. If it powers up as 0000, it stays at 0000 forever; with two 1s it circulates the wrong pattern.

Why use one: each output is already decoded. Flip-flop i is 1 only during step i, so its output can directly enable step i of a job with no decoder. Control units use this to generate timing signals T0, T1, T2 … for the steps of fetch and execute.

The trade-off is flip-flop count: a binary counter needs only log₂ n flip-flops for n states, and a johnson counter needs n/2.

startclkclkclkclk1000010000100001

Worked examples

Example

Stepping a ring counter

A 4-bit ring counter (shift right, SI = Q0) holds 0100. What does it hold after 3 edges?

  1. 1.

    Edge 1: old Q0 = 0 enters Q3: 0010.

  2. 2.

    Edge 2: old Q0 = 0: 0001.

  3. 3.

    Edge 3: old Q0 = 1 wraps to Q3: 1000.

Example

Counting states and flip-flops

A design needs 6 one-hot timing steps. Compare a ring counter with a binary counter.

  1. 1.

    Ring counter: 6 states need 6 flip-flops, and each output is a ready-made step signal.

  2. 2.

    Binary counter: 6 states need 3 flip-flops (2³ = 8 ≥ 6), plus a 3-to-8 decoder to make the step signals.

  3. 3.

    The ring counter spends flip-flops to save decoding logic.

Common mistakes

  • Thinking a ring counter has 2ⁿ states. It has n.

  • Starting it at 0000. It never leaves that state; it must be preset with a single 1.

  • Confusing it with a Johnson counter, which feeds back the complement and has 2n states.

Practice Ring counter

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Ring counter is taught in Registers and Counters.