The modulus of a counter tells you how long its cycle is: how many different states it visits before it comes back to where it started.
- A 3-bit binary counter visits 0 to 7, so its modulus is 8.
- A BCD counter visits 0 to 9, so its modulus is 10.
- A 4-bit ring counter visits 4 states, so its modulus is 4, even though it has 4 flip-flops.
n flip-flops can hold 2ⁿ patterns, so a full n-bit binary counter has modulus 2ⁿ. A mod n counter uses fewer than all of them, and the rest become unused states.
Two numbers sit right next to each other and are easy to mix up. The modulus N counts the states. The maximum count is the largest value shown, which is N − 1 for a counter that starts at 0, because 0 is one of the states.
The modulus also sets the division ratio: a mod-N counter goes round once every N clock cycles, so any output that repeats once per cycle runs at f / N.