Designing Sequential Logic Using Gates and Flip-Flops

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.

Step 1: Define the Requirements and State Diagram

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).

Step 2: Create the State Transition Table

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 Q1Current Q0Next Q1'Next Q0'J1K1J0K0
00010X1X
01101XX1
1000X10X
11XXXXXX

X = don't care (can be 0 or 1).

Step 3: Simplify Equations Using Karnaugh Maps

For each JK input, create a K-map based on current states (Q1 Q0) and treat don't cares to minimize logic.

K-Map for J1

Q1\Q000011110
001XX
1XXXX

Simplified: J1 = Q0 (grouping 01 and 11/10 don't cares).

K-Map for K1

Q1\Q000011110
0XXXX
11XXX

Simplified: K1 = 1 (constant, using don't cares).

K-Map for J0

Q1\Q000011110
01XX0
1XXXX

Simplified: J0 = NOT Q1 AND NOT Q0 (grouping 00).

K-Map for K0

Q1\Q000011110
0X1XX
1XXXX

Simplified: K0 = Q0 (grouping 01 and possibly don't cares).

Step 4: Implement with Gates and Flip-Flops

Use two JK flip-flops clocked together. Connect:

Outputs: Q1 and Q0 form the count. Add a reset line if needed for initialization.

Verification and Applications

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.

Back to Misc


Copyright 2026 - MicroBasement