Both a latch and a flip flop store one bit. The difference is when they let a new value in.
- A latch is level sensitive. While its enable is active it is transparent: Q follows D continuously, glitches included. When the enable goes inactive, Q freezes on the last value.
- A flip-flop is edge triggered. It samples D only at the active clock edge and holds Q until the next edge. What D does between edges never reaches Q.
The course's picture: a latch is a window (open for a while, you see everything), and a flip-flop is a camera (one click per edge, you see one photo).
Why the difference matters: when storage elements are chained, as in shift registers, counters and pipelines, latches sharing one enable let a bit run through several stages during one long enable pulse. Flip-flops move data exactly one stage per edge. That predictability is why synchronous designs are built from flip-flops.
Latches are not obsolete: they are smaller and are used inside flip-flops (a flip-flop is often two latches back to back, enabled on opposite clock levels) and in some high-speed designs. But for this course, if a question asks which one to use for clocked storage, the answer is a flip-flop.
A quick identification test on a waveform: if Q changes in the middle of a clock level, the device is a latch.