Home › Lessons › Digital logic › D flip-flop

D flip-flop

Digital logic · Beginner · about 10 minutes · part of Zen’s Electronics Design Mastery

A D flip-flop copies its D input to Q only at the instant the clock rises, and ignores D the rest of the time. Clocked storage like this is how registers and every synchronous circuit keep step.

D flip-flop: the circuit on the simulator's bench

Open this lesson in the labFree, in your browser, no account needed.

How it works

On each rising clock edge: Q ← D. Between edges, D can change freely and Q does not care.

CLKDQ next
↑00
↑11
0, 1 or ↓xQ (hold)

Rising edges so far: 0.

Try it on the bench

  1. Set D to 1 (switch 1). Q does not change until you click the clock’s red PULSE button.
  2. Flip D back and forth without pulsing: Q ignores it.
  3. Click RUN on the clock module to clock it continuously, then flip D and watch Q follow on the next tick.

Parts on the bench

In the course

Zen’s Electronics Design Mastery, module “Digital Electronics”.

More on digital logic