33. JK Flip-Flop: The Universal Flip-Flop
The JK Flip-Flop is considered the most versatile type because it incorporates all functionalities of the SR, D, and T flip-flops, while also handling the ambiguous state.
Addressing the Invalid State
The JK FF incorporates feedback from its own outputs ($Q$ and $\overline{Q}$) back into the input control gates, preventing the illegal state.
- J acts as the Set input.
- K acts as the Reset input.
Characteristic Table
| J | K | CLK | Q(t+1) | Operation |
|---|---|---|---|---|
| 0 | 0 | $\uparrow$ | Q(t) | Hold (Memory) |
| 0 | 1 | $\uparrow$ | 0 | Reset (Clear) |
| 1 | 0 | $\uparrow$ | 1 | Set |
| 1 | 1 | $\uparrow$ | $\overline{Q(t)}$ | Toggle (Invert State) |
The Toggle State (J=1, K=1)
When both J and K are HIGH, the FF inverts its state (toggles) on every clock edge. This capability is essential for building counters.
Because the JK FF can operate in Hold, Set, Reset, or Toggle mode, it is highly suitable for complex state machine design.