The toggle rule says which bits of a binary counter change at the next clock edge:
- Up counter: a bit toggles exactly when every bit below it is 1.
- Down counter: a bit toggles exactly when every bit below it is 0.
- Q0 has no bits below it, so it toggles every time.
Why? Adding 1 is just binary addition with a carry. A carry passes through a bit only if that bit is 1 (1 + 1 = 0, carry 1). So the carry reaches bit k only when all the bits below it are 1, and when it arrives it flips bit k. Counting down works the same way with borrows, which pass through 0s.
This one rule is behind every counter circuit:
- A synchronous counter uses it directly: Tₖ is the AND of all the lower bits, so T2 = .
- A ripple counter uses it through the wiring: bit k is clocked when bit k − 1 falls from 1 to 0, which is exactly when the carry arrives.
It's also a quick mental check: from 0111, every bit below Q3 is 1, so all four bits flip and the next count is 1000.
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 |