Caffeinated Coder
Book an appointment
Lesson 22 · Memory elements and clocks

Counters

A counter is a register plus an adder that adds 1. On every rising clock edge the register saves the adder's answer, so a 4-bit counter goes 0, 1, 2 ... 15 and then wraps to 0. Watch it count in binary, wrap and reset, then compare it with a ripple counter built from toggle flip-flops, and see counters at work as clock dividers, timers and the CPU's program counter.

12 min11 steps6 questionsIntermediate
Fig 22 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.