A binary up counter is the most common kind of counter. It uses n flip-flops, one per bit, and together they hold a number written Q₍ₙ₋₁₎…Q1Q0. Q0 is the least significant bit.
- Each active clock edge adds 1 to the stored number.
- After the all-1s state it wraps around to all 0s.
- So an n-bit counter has 2ⁿ states and a modulus of 2ⁿ.
A 3-bit counter shows Q2Q1Q0 = 000, 001, 010, … , 111, then 000 again.
Why does it work? Adding 1 in binary flips the trailing 1s to 0 and the lowest 0 to 1. That gives the toggle rule: a bit toggles exactly when every bit below it is 1. A ripple counter gets that behavior by clocking each stage from the one below. A synchronous counter gets it with AND gates in front of shared-clock T flip-flops.
A handy shortcut: after k edges, an n-bit up counter that started at s holds (s + k) mod 2ⁿ. Along the way it has shown k + 1 values, counting the start.