← ProblemsCircuits / Sequential Logic / Latches and Flip-Flops
JK flip-flop
36%flip-flopsproceduresA JK flip-flop behaves like this at every rising edge of the clock (where Qold is the output just before the edge):
| J | K | Q (next) |
|---|---|---|
| 0 | 0 | Qold (hold) |
| 0 | 1 | 0 (reset) |
| 1 | 0 | 1 (set) |
| 1 | 1 | ~Qold (toggle) |
Implement a JK flip-flop using only a D flip-flop and gates — that is, compute the D input from j, k, and the current Q. The characteristic equation is Qnext = (J AND ~Q) OR (~K AND Q).