Sequential circuits and state machines
A sequential circuit stores information. Analyse its storage elements, active edges and asynchronous controls before deriving state equations. Design uses the reverse process: required behaviour, state table, storage inputs, then gates.
5.1 Latches and asynchronous controls
Past papers · CS 2014–2026 (23 papers): 1 question, 1 mark
A latch is level-sensitive. An active-high D latch follows while enable and holds while . A flip-flop is edge-triggered. A MUX feeding back its own output on the hold path implements a latch, not an edge-triggered flip-flop.
During the forbidden NOR-latch input both outputs are 0; for the forbidden NAND-latch input both are 1. On simultaneous release the final state is not guaranteed. Do not impose in those forbidden conditions.
Asynchronous preset and clear act independently of the clock. Their simultaneous assertion is device-dependent and normally forbidden. Synchronous reset acts only at an active edge. A master–slave arrangement uses complementary transparent phases to prevent direct input-to-output transparency; its effective edge depends on which phase opens the master.
5.2 Flip-flop characteristics and excitation
Past papers · CS 2014–2026 (23 papers): 5 questions, 10 marks · EC 2020–2026 (7 papers): 4 questions, 8 marks · EE 2020–2026 (7 papers): 2 questions, 3 marks
A level-sensitive JK arrangement with can toggle repeatedly during a long active clock pulse (race-around). Proper edge-triggered or master–slave storage prevents this mechanism. A toggle flip-flop gives half the clock frequency and, in steady state, 50% output duty cycle regardless of input duty cycle, provided minimum pulse widths are met.
5.3 Sequential synthesis and unused states
Past papers · CS 2014–2026 (23 papers): 4 questions, 6 marks · EE 2020–2026 (7 papers): 1 question, 2 marks
List the required states and outputs, assign binary state codes, build the present-state/next-state table for every input, and use the excitation table for the chosen flip-flops. Minimise each excitation and output function. Finally compute transitions from every unused binary code: “unused” is not proof that a circuit is self-starting.
For a periodic output sequence, count distinct phases of its smallest repeating period, not merely distinct displayed values. Merge phases only if their complete future behaviour is identical. For a synchronous saturating counter, the top state holds on an up request and the bottom state holds on a down request; modulo counters instead wrap.
5.4 Finite state machines and sequence detection
Past papers · CS 2014–2026 (23 papers): 2 questions, 4 marks · EC 2020–2026 (7 papers): 1 question, 2 marks · EE 2020–2026 (7 papers): 1 question, 1 mark
A Moore output depends only on the present state; a Mealy output depends on state and current input. Mealy outputs may change within a cycle when the input changes. Moore outputs are constant while a state is held, but combinational state decoding can glitch during multi-bit transitions.
For state minimisation, first remove unreachable states when the initial state is specified. Partition Moore states by output, or Mealy states by their output vector for all inputs. Repeatedly split any block whose states have successors in different blocks for some input. Stop when no split occurs. States in the same final block are equivalent. One-step matching is insufficient.
For a sequence detector, label states by the longest suffix of the observed input that is a prefix of the target word. With overlapping detection, after a match retain the longest useful suffix; with nonoverlapping detection restart. Specify whether an output is attached to the transition consuming the final bit or to a subsequently entered state.
5.5 Counters and frequency division
Past papers · CS 2014–2026 (23 papers): 2 questions, 2 marks · EC 2020–2026 (7 papers): 2 questions, 2 marks · EE 2020–2026 (7 papers): 2 questions, 2 marks
A synchronous counter clocks every flip-flop from one clock; a ripple counter clocks later stages from earlier outputs. Ripple waveforms therefore pass through transient codes. Count direction depends on edge polarity and whether or clocks the next stage.
For a decoded output that is high in of equal-duration count states, duty fraction is . Determine its smallest repeating pattern to find its frequency; it may repeat more than once per full counter cycle. For counting inclusively from 0 through , modulus is .
A truncated ripple counter often resets when its binary state reaches . Include reset-path delay and pulse-width requirements; the transient decoded state is not a full-duration stable count. A synchronous modulo- design sets the terminal state's next state to zero. Both need recovery analysis from unused states.
5.6 Shift registers, ring and Johnson counters
Past papers · CS 2014–2026 (23 papers): 3 questions, 4 marks · EC 2020–2026 (7 papers): 1 question, 2 marks
SISO, SIPO, PISO and PIPO name serial/parallel input and output. A shift register stores one bit per stage and advances data by one stage per active edge. For a parallel-load/shift register, use MUXes at D inputs to select the mode before the edge.
A ring initialised to zero stays zero. Other ring patterns can have shorter periods. Johnson circuits have unused cycles for some widths and require a valid reset or correction. For arbitrary feedback, write the full next-state equations, iterate until a state repeats, and separate any initial transient from the cycle. An XOR-feedback shift register keeps all-zero state fixed; its nonzero cycle length is at most , attained only with appropriate taps. Do not assume every XOR feedback is maximal length.
Last-minute recall
- A latch is transparent over a level; a flip-flop samples an edge.
- Asynchronous controls override the edge-triggered equations.
- Compute all next-state bits from the same present state.
- D excitation equals next state; T excitation is old XOR new.
- Count distinguishable states, not distinct output labels.
- Minimise an FSM until its state partition stops changing.
- A modulo- counter has stable counts.
- Ring and Johnson state counts depend on initialisation.
- Test unused-state recovery after simplifying excitation logic.