Skip to content
LearnTronics menu

LearnTronics

The D Flip-Flop and Timing

Tutorial Index

The D flip-flop stores one bit at a clock edge

The D flip-flop is one of the most useful memory elements in digital electronics.

D FLIP-FLOP TIMING CLK D Q rising edges setuphold t_pd D must be stable around the clock edge. Q changes a little later because real hardware has delay.

The simple logical idea

At the selected clock edge:

Q(next) = D

Between active clock edges, Q holds its stored value.

Three timing specifications now matter

Setup time: D must become stable a certain time before the active clock edge.

Hold time: D must remain stable for a certain time after the edge.

Clock-to-Q propagation delay: Q changes a little after the clock edge.

This is where “delay” stops being optional knowledge

Boolean algebra tells us what value should be stored. Timing specifications tell us whether the physical flip-flop had enough time to recognize that value reliably.

Violating setup or hold time

If the data changes too close to the sampling edge, the device can enter a temporary uncertain condition called metastability. Designers therefore treat setup, hold, clock frequency, and propagation delay as real engineering limits, not merely theoretical details.

From one bit to registers and counters

Several flip-flops can store several bits. Arranged in groups they form registers; connected with appropriate feedback they can form counters, shift registers, state machines, and many other digital systems.

Try these yourself

What does a rising-edge D flip-flop normally do at the rising clock edge? D FLIP-FLOP TIMING CLK D Q rising edges setuphold t_pd D must be stable around the clock edge. Q changes a little later because real hardware has delay.
At the active edge, the flip-flop samples D and stores that value at Q.
What is setup time?
Setup time is the required interval before the clock edge during which the data input must already be stable.
Why does Q not change at exactly the same instant as the clock edge?
Physical gates require finite time to respond, so Q changes after a small clock-to-Q propagation delay.