It stores a state
The output depends on the current inputs and the value already stored inside the circuit.
DIGITAL ELECTRONICS · STATE & MEMORY
Combinational circuits calculate from their current inputs. Sequential circuits also remember what happened before.
Set the inputs, then pulse the clock to capture them.
Follow D through two clocked latches. The master is transparent during CLK low; the slave transfers its stored value during CLK high.
Master-to-slave handoff · JK view
During CLK low, CLK̅ opens the master input gate while the slave feedback gate holds Q. During CLK high, the master closes and the slave input gate opens. Each transmission gate pairs an NMOS and PMOS; the feedback inverter and gate retain the latch value.
A static transmission-gate D flip-flop: two complementary MOS switches and two CMOS inverters make each latch. Master and slave share the data path and use opposite clock phases.
The first transmission gate samples D while CLK is low. Its feedback gate closes to retain the master value as the slave opens on CLK high. The paired CMOS inverters restore the logic level and the slave stores the transferred value.
Follow the input signals through the gates and feedback wires into the selected base cell.
The output depends on the current inputs and the value already stored inside the circuit.
Flip-flops capture input values on a clock edge, keeping larger circuits in sync.
Connect flip-flops together to make registers, counters, and state machines.