A JK flip-flop is a clocked memory element with two control inputs. At each active clock edge it looks at J and K and decides what Q should become; between edges, Q holds.
- J = 0, K = 0: hold. Q keeps its value.
- J = 1, K = 0: set. Q becomes 1.
- J = 0, K = 1: reset. Q becomes 0.
- J = 1, K = 1: toggle. Q flips to its opposite.
Think of J as "jump to 1" and K as "kill to 0". The JK is an improved SR design: where an SR latch has a forbidden input (S = R = 1), the JK gives that combination a useful meaning, toggling. It manages this by ANDing J with and K with Q inside, so J can only set a flip-flop that is 0 and K can only reset one that is 1. With both at 1, exactly one of them acts, and Q flips.
That makes it a handy building block for counters, and with J and K tied together it behaves as a t flip flop. With K wired to it behaves as a d flip flop.
Its behavior fits in one characteristic equation: Q⁺ = . Read it as: "Q becomes 1 if J asks to set while Q is 0, or if K doesn't ask to reset while Q is 1."
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 0 |