Skip to main content

4. Sequential Circuits

Learning Objectives

  • Define a sequential circuit and explain how it differs from a combinational circuit
  • Explain the role of feedback and memory elements (flip-flops) in maintaining state
  • Distinguish synchronous sequential circuits (clocked) from asynchronous ones
  • Describe how state, present inputs, and next state relate in a sequential system
  • Identify flip-flops, registers, and counters as categories of sequential circuits
  • Apply sequential circuit concepts to explain a simple real-world state machine

Quick Answer

A sequential circuit is a digital circuit whose output depends on both the current inputs and the circuit's stored history — its current "state." This memory comes from feedback loops built with flip-flops or latches, which hold a bit of information stable until a triggering event (usually a clock edge) tells them to update. Sequential circuits matter because almost nothing useful in computing works without memory: counters, registers, RAM, and entire CPUs are sequential circuits built by combining combinational logic with storage elements.

How Sequential Circuits Work

The defining feature of a sequential circuit is feedback: the output (or an internal state signal) is routed back and combined with the inputs to decide the next state. This is what makes memory possible. A sequential circuit can be described by three things at any moment: its present state, its inputs, and the combinational logic that computes both the next state and the current output from those two.

Key Characteristics

  1. Memory — the circuit retains information between clock cycles using flip-flops or latches.
  2. State-dependent behavior — the same input can produce different outputs depending on the current state.
  3. Feedback — internal connections route stored values back into the logic that computes the next state.

Synchronous vs Asynchronous

In a synchronous sequential circuit, all memory elements share a common clock signal, and state changes happen only on clock edges (rising or falling). This makes timing predictable and is how the vast majority of digital systems, including CPUs, are designed.

In an asynchronous sequential circuit, state changes can happen immediately in response to input changes, without waiting for a clock edge. This can be faster but is far harder to design correctly because of timing hazards like race conditions, where the order in which signals change affects the final result unpredictably.

Building Blocks

Flip-flops are the fundamental one-bit memory element of sequential circuits. An SR latch (built from cross-coupled NAND or NOR gates) can be set or reset; a D flip-flop captures the value on its D input at a clock edge and holds it; a JK flip-flop adds a toggle capability. (See the dedicated Flip-Flops page for full truth tables.)

Registers group several flip-flops together to store multi-bit values — for example, an 8-bit register holds one byte, with each flip-flop capturing one bit on the same clock edge.

Counters are sequential circuits built from flip-flops that step through a defined sequence of states (usually counting up or down) on every clock pulse, then wrap back to the start.

Real-World Example

A vending machine's control logic is a classic sequential circuit example: it needs to remember how much money has been inserted so far (its state) before deciding whether to dispense a product on the next coin input. The same "insert 10 cents" input produces a different output depending on whether the machine's state shows 40 cents or 90 cents already collected — that dependence on history is the signature of a sequential circuit.

Common Misunderstanding

Students sometimes think any circuit with a clock signal is automatically "sequential" and any circuit without one is "combinational." The real test is feedback and memory, not the presence of a clock — a combinational circuit can be timed by a clock purely to control when its (memoryless) output is sampled, while what actually defines a sequential circuit is that a stored state genuinely influences the next output.

Key Terms

TermDefinitionRelated Concept
Sequential circuitA circuit whose output depends on current inputs and stored stateFeedback, memory
StateThe set of stored values that summarize the circuit's historyFlip-flops
Synchronous circuitA sequential circuit where all memory elements share a common clockClocked logic
Asynchronous circuitA sequential circuit that changes state without a shared clock, based on input changesRace conditions
FeedbackA connection that routes an output or state signal back into the input logicMemory element
Clock edgeThe rising or falling transition of a clock signal, used to trigger state updatesSynchronous design
Race conditionA timing hazard where the order of signal changes affects circuit behavior unpredictablyAsynchronous design

Common Mistakes

Misconception: Any circuit that includes a clock input is a sequential circuit. Why it's wrong: A clock can simply time when a combinational output is read (as in a pipeline register that just passes data through), without the circuit actually depending on past state in a meaningful way. Correct understanding: The defining feature is that stored state genuinely affects the current output — check for feedback loops and memory elements, not just the presence of a clock wire.

Misconception: Asynchronous sequential circuits are always better because they respond immediately without waiting for a clock. Why it's wrong: Immediate response comes at the cost of race conditions and glitches — if two signals that should change together arrive at slightly different times, the circuit can briefly enter an incorrect or unstable state. Correct understanding: Synchronous design trades some speed for reliability by only updating state on clock edges, which is why nearly all large-scale digital systems use synchronous sequential design.

Misconception: "State" in a sequential circuit means the same thing as "output." Why it's wrong: State is the internal stored information; the output is a signal derived from the state (and sometimes the inputs), and in many designs the state has more bits or detail than what is ever shown on the output. Correct understanding: Think of state as the circuit's private memory and output as what it chooses to reveal — a state machine can have internal states that never appear directly on any output pin.

Comparison and Connections

FeatureCombinational CircuitSequential Circuit
MemoryNoneYes (flip-flops/latches)
Output depends onPresent inputs onlyPresent inputs and past state
FeedbackAbsentPresent
TimingLimited by propagation delay onlyGoverned by clock cycles (synchronous)
ExampleAdder, multiplexerCounter, register, flip-flop

Practice Questions

Recall

  1. What two elements does a sequential circuit's next state depend on? The present state and the present inputs.

  2. Name the two main categories of sequential circuits based on clocking. Synchronous (common clock signal) and asynchronous (no shared clock).

Understanding

  1. Explain why feedback is necessary for a circuit to have memory. Without feedback, an output is computed fresh from inputs every time with no way to "carry forward" past information; feedback routes a stored value back into the logic so the circuit's response can depend on what happened previously.

  2. Why are synchronous designs preferred over asynchronous designs in most large digital systems? Synchronous designs update state only on clock edges, which avoids race conditions and timing hazards, making behavior predictable and easier to verify, test, and scale to millions of gates.

Application

  1. A traffic light controller needs to move from green to yellow to red in sequence, staying in each state for a fixed duration. What type of circuit is this, and why? It is a sequential circuit (a finite state machine) because the next light color depends not just on the current timer input but on which color is currently active — the system must remember its current state.

  2. You are designing a digital lock that only unlocks after the correct 4-digit sequence is entered in order. Why must this be built as a sequential circuit rather than a combinational one? Because the correct output (unlock) depends on the history of previously entered digits, not just the current digit — the circuit must remember how many correct digits have been entered so far, which requires stored state.

Analysis

  1. A student says: "If I remove the clock from a synchronous sequential circuit, it just becomes combinational." Evaluate this claim. This is incorrect. Removing the clock would leave the flip-flops without a trigger to update state, so the circuit would simply stop updating properly (or behave unpredictably) — it would not become combinational, since the memory elements (and feedback) are still physically present; it would just be a broken sequential circuit.

  2. Compare a counter and a shift register in terms of what "moves" through the state on each clock pulse. In a counter, the numeric value stored in the flip-flops increments (or decrements) by a fixed rule each clock pulse. In a shift register, the actual bit pattern shifts position — each flip-flop passes its stored bit to its neighbor — rather than the value changing according to arithmetic.

FAQ

What is the simplest possible sequential circuit? A single SR latch, made from two cross-coupled NAND or NOR gates, is the simplest sequential circuit — it stores one bit of information using feedback between the two gates, with no clock required.

Do sequential circuits always need a clock? No. Asynchronous sequential circuits (like a basic SR latch) change state directly in response to input transitions. However, most practical large-scale sequential systems use a clock to keep every memory element synchronized and avoid timing hazards.

How is "state" represented physically in hardware? State is represented by the stored voltage levels in the flip-flops or latches that make up the circuit's memory. A circuit with n flip-flops can represent up to 2ⁿ distinct states.

Why is a race condition a problem specifically in asynchronous circuits? Because without a clock to synchronize when changes happen, two paths of different lengths carrying related signals can cause the circuit to briefly settle into an unintended, incorrect state before finally reaching the correct one — and that momentary error can sometimes get latched in permanently.

What everyday devices rely on sequential circuits? Digital clocks, elevator controllers, washing machine cycle controllers, vending machines, and every computer's CPU registers and memory are built from sequential circuits — anywhere a device needs to "remember what step it's on."

Quick Revision

  • Sequential circuits' outputs depend on present inputs AND stored state (memory)
  • Memory comes from feedback through flip-flops or latches
  • Synchronous circuits share a common clock; state updates only on clock edges
  • Asynchronous circuits update immediately but risk race conditions
  • Flip-flops store 1 bit; registers group flip-flops for multi-bit storage; counters step through a state sequence
  • A circuit with n flip-flops can represent up to 2ⁿ distinct states
  • The presence of a clock alone does not make a circuit sequential — feedback and stored state do
  • Vending machines, traffic lights, and digital locks are real-world sequential circuit examples

Prerequisites: Logic gates, combinational circuits, basic Boolean algebra

Related Topics: Flip-flops, finite state machines, clock timing and propagation delay

Next Topics: Flip-flops in detail, counters, registers, and memory devices