PHY 452 · Electronics
Our notes
2 min readSequential circuits
A synchronous sequential circuit has flip-flops (state memory) and combinational logic deciding the next state and outputs, all changed by a common clock.
- Moore machine: outputs depend only on the present state.
- Mealy machine: outputs depend on the present state and the inputs.
Design steps
- Understand the specification; draw a state diagram (circles for states, arrows for transitions labelled with inputs and outputs).
- Build the state table: present state, input, next state, output.
- Assign binary codes to states (n flip-flops give up to 2^n states).
- Choose the flip-flop type and use its excitation table to find the inputs needed for each transition.
- Use K-maps to minimise the flip-flop input equations and output equations.
- Draw the circuit and check unused states (they should lead back into the sequence).
Worked example: synchronous mod-4 counter with JK flip-flops
States 00 → 01 → 10 → 11 → 00 (Q1 Q0).
JK excitation: 0 → 0 needs J = 0, K = X; 0 → 1 needs J = 1, K = X; 1 → 0 needs J = X, K = 1; 1 → 1 needs J = X, K = 0.
| Q1 Q0 | Next | J1 K1 | J0 K0 |
|---|---|---|---|
| 00 | 01 | 0 X | 1 X |
| 01 | 10 | 1 X | X 1 |
| 10 | 11 | X 0 | 1 X |
| 11 | 00 | X 1 | X 1 |
Result: J0 = K0 = 1 (Q0 toggles each clock) and J1 = K1 = Q0 (Q1 toggles when Q0 = 1).
Example: sequence detector
A circuit that outputs 1 when the input stream contains "101". States: S0 (nothing), S1 (seen 1), S2 (seen 10); in S2 an input 1 gives output 1 and moves to S1 (allowing overlapping sequences). Two flip-flops are enough for three states.
Other designs
Traffic light controllers, vending machine logic, the control unit of a processor, serial code checkers.
Programmable devices
Today many sequential designs are put into PLDs and FPGAs (field-programmable gate arrays), described in a hardware description language (VHDL, Verilog) and compiled into gates.
Exams usually ask
- Design a synchronous counter of a given sequence using JK or D flip-flops.
- Distinguish Moore and Mealy machines.
Common mistake
Using the flip-flop's characteristic table instead of its excitation table in design. The design question is "what inputs produce this change?", which the excitation table answers.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
No reading links here yet
Our team adds free books, videos and practice for each topic, and opens every link before it goes up.