Day 24: Counters: synchronous vs asynchronous, mod-N
Counting in hardware
A counter is a register that advances through a sequence of values on each clock. The simplest is the asynchronous (ripple) counter: chain toggle flip-flops so each stage's output clocks the next. It's tiny, but the clock *ripples* through the chain — high bits update later than low bits — so the count passes through transient wrong values and accumulated delay.
A synchronous counter clocks every flip-flop from the same clock, with combinational logic computing each bit's next value. All bits update together — no ripple, no transient glitches, and a clean, predictable timing path. Mod-N counters wrap after N counts (e.g. a mod-10 7490 for decimal); a terminal count output signals the wrap.
Why sync design dominates
Because a ripple counter's bits change at staggered times, any logic that *decodes* the count sees momentary false values — a real bug source. Synchronous counters avoid this entirely. This is a concrete first taste of the industry rule you'll live by from Stage 2: clock everything from one edge.
Key terms
- Ripple (async) counter
- Toggle flip-flops chained so each stage clocks the next; small but glitchy and slow to settle.
- Synchronous counter
- All flip-flops share one clock, with next-state logic; updates cleanly in one edge.
- Mod-N counter
- A counter that wraps after N states (e.g. mod-10 for decimal digits).
- Terminal count
- An output asserted when a counter reaches its maximum/wrap value.
Before moving on, you should be able to
What is the essential difference between a synchronous and an asynchronous (ripple) counter?