Back to course

Modulo-N Counters (Design Examples)

Digital Logic Systems: From Zero to Hero

44. Modulo-N Counters (Design Examples)

Most practical counters are designed to count to a specific modulus N (where $N \ne 2^k$), such as a MOD-10 (Decade) counter, or a MOD-6 counter.

1. Asynchronous Modulo-N Counters (Truncation)

We can modify an N-bit ripple counter to stop counting prematurely using asynchronous clear/reset signals.

  • Example: MOD-6 Counter (0 to 5): Use a 3-bit counter ($2^3 = 8$ states).
  • The next state after 5 ($101_2$) is 6 ($110_2$). We detect the state 6 ($Q_2 Q_1 \overline{Q_0}$) using an AND gate.
  • When the counter hits 6, the AND gate output immediately triggers the asynchronous Clear input on all FFs, resetting the count to 000.

2. Synchronous Modulo-N Design

In synchronous design, truncation is handled by adjusting the $J$ and $K$ inputs (or $D$ inputs) based on the full state table for the desired modulus (e.g., for MOD-10, the states 10 through 15 are excluded from the required state diagram).

Synchronous design is more complex but offers cleaner, glich-free transitions, essential for robust systems.