Sequential logic circuits, unlike combinational ones, have outputs that depend on both current inputs and previous states (memory). They are designed using flip-flops for storage and logic gates for decision-making. The process involves defining states, creating a state diagram, deriving excitation equations, simplifying with Karnaugh maps (K-maps), and implementing with gates. Below is a step-by-step example: designing a synchronous modulo-3 counter (counts 0-1-2-0...) using JK flip-flops.
A modulo-3 counter has three states: 00, 01, 10 (binary). It cycles on each clock pulse. We use two JK flip-flops (Q1 Q0) for states. Input: clock (CLK). Output: the state itself (Q1 Q0).
State diagram: 00 ? 01 ? 10 ? 00 (on each CLK rising edge).
List current state (Q1 Q0), next state (Q1' Q0'), and required JK inputs for each flip-flop (J1 K1, J0 K0). Recall JK excitation: Hold (J=0 K=0), Reset (J=0 K=1), Set (J=1 K=0), Toggle (J=1 K=1).
| Current Q1 | Current Q0 | Next Q1' | Next Q0' | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 | X | 1 | X |
| 0 | 1 | 1 | 0 | 1 | X | X | 1 |
| 1 | 0 | 0 | 0 | X | 1 | 0 | X |
| 1 | 1 | X | X | X | X | X | X |
X = don't care (can be 0 or 1).
For each JK input, create a K-map based on current states (Q1 Q0) and treat don't cares to minimize logic.
| Q1\Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | X | X |
| 1 | X | X | X | X |
Simplified: J1 = Q0 (grouping 01 and 11/10 don't cares).
| Q1\Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | X | X |
| 1 | 1 | X | X | X |
Simplified: K1 = 1 (constant, using don't cares).
| Q1\Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 1 | X | X | 0 |
| 1 | X | X | X | X |
Simplified: J0 = NOT Q1 AND NOT Q0 (grouping 00).
| Q1\Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | 1 | X | X |
| 1 | X | X | X | X |
Simplified: K0 = Q0 (grouping 01 and possibly don't cares).
Use two JK flip-flops clocked together. Connect:
Outputs: Q1 and Q0 form the count. Add a reset line if needed for initialization.
Simulate: Start at 00 ? CLK ? 01 ? CLK ? 10 ? CLK ? 00. This design scales to larger counters or FSMs (e.g., vending machines, traffic lights). Tools like Logisim can verify circuits.