Computer engineering · also Electrical engineering
Sequential logic and memory
Combinational logic only reacts to its present inputs, but sequential logic can remember. A latch holds a bit until it is told to change. An edge-triggered flip-flop updates only at the moment a clock signal rises, so many flip-flops across a chip all change in step. Groups of flip-flops form registers that store whole numbers, and counters that add one on every clock pulse. The clock sets the pace of a digital system: every result must settle before the next clock edge arrives.
Why it mattersThe hardware timer that counts encoder pulses on a robot's wheel is built from flip-flops forming a counter.