1. The SR Latch: The Simplest Bistable Element
The simplest bistable element can be built from two cross-coupled NOR or NAND gates and is called an SR latch (set-reset latch). In the NOR version, the circuit holds its state as long as both inputs S (set) and R (reset) are 0; a high level on S sets the output Q to 1, a high level on R resets it to 0, and the combination S=R=1 is defined as a forbidden state, since both outputs Q and the inverted Q̄ then fall to 0 simultaneously, leaving the subsequent state undefined once both inputs return to 0 together – which of the two gates "wins" depends on tiny propagation delay differences.
The feedback that gives the latch its name arises because the output of each gate is fed back to the input of the other: once a state is set, it holds itself, since both gates mutually "support" each other as long as S and R remain 0 – this same principle of positive feedback also underlies the latches and flip-flops discussed in the following sections. An equivalent NAND-based version, in which the inputs S̄ and R̄ are active-low, is equally common in practice, for example for debouncing mechanical switches, where a single button press should produce only one clean state change despite multiple contact bounces.
The SR latch is therefore the simplest element capable of storing a single bit of state without requiring a clock signal – it responds immediately (asynchronously) to changes on S and R, which also makes it susceptible to brief glitches. Adding a clock signal and a gating circuit that only lets S and R through during an active clock phase turns it into a clocked SR latch – the precursor to the edge-triggered flip-flops discussed in the following sections.