A latch is a circuit with two stable states that stores one bit. An SR latch has inputs (set) and (reset): makes its output 1, makes it 0, and keeps it. The input is forbidden. A D latch has a data input and an enable : while its output follows (it is transparent), and while it keeps the last value.
| next | ||
|---|---|---|
| 0 | 0 | (hold) |
| 1 | 0 | 1 (set) |
| 0 | 1 | 0 (reset) |
| 1 | 1 | forbidden |