Skip to content
BetterDL

Sequential circuit

Also called: sequential logic, sequential, combinational vs sequential, stateful circuit

A circuit whose outputs depend on its current inputs and on stored information about the past, kept in latches or flip-flops.

A sequential circuit remembers. Its output depends on the inputs you apply now and on something it has stored from earlier. That stored information is its state.

Compare a combinational circuit. There, the output is a fixed function of the present inputs: apply the same inputs and you always get the same output. A sequential circuit can give two different outputs for the same inputs, because its state may have changed in between.

Why you need one:

  • A counter has to know the last count to produce the next one.
  • A vending machine has to know how much money is already in.
  • A CPU has to keep its numbers between instructions.

How it works: every sequential circuit contains a feedback loop, an output wired back to an input so a value keeps itself in place. In practice the loops are packaged as latches and flip-flops. Most sequential circuits are synchronous: a shared clock decides when the stored values may change, so the whole circuit steps from one state to the next at each rising edge.

A useful test: could the same inputs ever give different outputs? If yes, the circuit is sequential.

Worked examples

Example

Same inputs, different outputs

An SR latch receives S = 0, R = 0 in slot 1 and again in slot 4. Q starts at 0. Does the circuit behave combinationally?

SRQ
  1. 1.

    Slot 1: S = 0, R = 0 and Q = 0.

  2. 2.

    Slot 3: S = 1 sets the latch, so Q = 1.

  3. 3.

    Slot 4: S = 0, R = 0 again, the same inputs as slot 1. But now Q = 1.

  4. 4.

    Same inputs, two different outputs. No combinational circuit can do that, so the latch is sequential.

  5. 5.

    The difference is the stored state: 0 in slot 1, 1 in slot 4.

Example

Classifying three circuits

Decide whether each circuit must be sequential.

  1. 1.

    A 4-bit adder: the sum depends only on the two numbers applied now. Combinational.

  2. 2.

    A circuit that lights an LED after a button has been pressed three times: it must count presses, so it needs memory. Sequential.

  3. 3.

    A 3-to-8 decoder: each output is a fixed function of the address. Combinational.

  4. 4.

    Rule of thumb: if the description includes words like after, count, previous or so far, the circuit needs state.

Common mistakes

  • Calling any circuit with a clock input sequential and any circuit without one combinational. An SR latch has no clock and is still sequential; what matters is stored state.

  • Thinking that a sequential circuit ignores its present inputs. Its output depends on the inputs and the state together.

  • Assuming a loop of gates is always a mistake. Unwanted loops are a bug in combinational logic, but a deliberate feedback loop is exactly how memory is built.

Practice Sequential circuit

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Sequential circuit is taught in Latches and Flip-Flops, Finite State Machines and Timing and Sequential Logic.