A latch is the simplest circuit that stores one bit. It is built from two gates wired in a feedback loop, so the stored value keeps itself in place after the input that set it has gone away.
The defining feature of a latch is when it can change. A latch is level sensitive: it reacts the whole time its inputs or its enable are at the active level. There is no single instant of capture.
The main kinds:
- SR latch: no clock or enable. S = 1 sets Q to 1, R = 1 resets it to 0, and S = R = 0 holds.
- NAND SR latch: the same idea with active-low inputs.
- Gated D latch: a single data input D plus an enable. While the enable is active, Q follows D (the latch is transparent); when it goes inactive, Q freezes.
A handy picture: a latch is a window. While it is open, Q shows everything D does. Contrast a flip flop, which is a camera that takes one snapshot per clock edge. See latch vs flip flop for the full comparison.
Latches are also called bistable elements, because the feedback loop has exactly two stable states: Q = 0 and Q = 1.