D flip-flop
D flip-flop: stores D at the instant CLK goes from 0 to 1; Q stays put the rest of the time.
Characteristic table (on the CLK 0→1 edge)
| D | Q⁺ |
|---|---|
| 0 | 0 |
| 1 | 1 |
Pins
D and CLK on the left; Q and its complement Q̅ on the right.
How to use it
Hold one bit; chain several for a shift register; feed Q̅ back into D for a divide-by-2.
Usage example
Data D and the clock go on the left, Q drives an LED. Q takes D's value only at the instant the clock goes from 0 to 1.
Common mistakes
Changing D doesn't change Q right away — it waits for the next rising clock edge.