Combinational vs Sequential Logic: Differences Explained

In combinational logic the output depends only on the present inputs, so the same inputs always give the same output. In sequential logic the output also depends on stored state, which means on the history of past inputs. Sequential circuits add memory elements such as flip-flops, and are usually controlled by a clock. Real digital systems alternate the two: combinational logic computes between registers that hold the state.

AspectCombinational logicSequential logic
Output depends onPresent inputs onlyPresent inputs and the stored state (history)
Memory elementsNoneFlip-flops or latches
ClockNot neededUsually clocked (synchronous design)
FeedbackNone: a feedback loop would be a design errorFeedback through the state elements
ExamplesAdders, multiplexers, decoders, encoders, comparatorsRegisters, counters, shift registers, state machines
Timing concernsPropagation delay, and glitches (hazards) while inputs changeSetup and hold times, clock period and clock skew
Design toolsTruth tables, Boolean algebra, Karnaugh mapsState tables and state diagrams
In VerilogContinuous assignments or always blocks that set every output in every branchClocked always blocks (on the clock edge)

Figures are typical orders of magnitude and vary by process generation and product.

When to use which

Combinational
For calculation and decoding that should depend only on the present values, such as arithmetic and selection.
Sequential
For anything that remembers: counters, registers, controllers, and any circuit that follows a sequence of steps.
HDL tip
In a combinational always block, assign every output in every branch. Otherwise synthesis infers an unintended latch.

FAQ

Is a flip-flop combinational or sequential?

Sequential. It stores a bit, so its output depends on the stored state, not only on its inputs.

Is an adder combinational or sequential?

Combinational. Its outputs depend only on the current inputs. A counter, in contrast, is sequential.

Can a circuit be both?

Yes. Real digital systems alternate combinational logic between registers, so the whole system is sequential and built from combinational blocks.

Why are feedback loops a problem in combinational logic?

A combinational circuit should have no loops. A loop makes the output depend on itself, which can oscillate or hold a state unintentionally.

Check your understanding

Which correctly describes a sequential circuit?

  1. AIts output depends on the current inputs and a stored internal state
  2. BIts output depends only on the current inputs
  3. CIt handles only analog signals
Show answer and explanation

Answer: A. Its output depends on the current inputs and a stored internal state

A sequential circuit contains memory elements such as flip-flops, so its output depends not only on current inputs but also on past history (its internal state). Counters, registers and state machines are typical examples, able to model things like a vending machine tracking inserted coins. Circuits whose output depends only on current inputs are combinational (adders, decoders, etc.), and real digital systems alternate the two, synchronized by a clock.

In a combinational circuit, what is the unwanted pulse that appears briefly at the output when an input changes, due to different delays along different paths?

  1. AMetastability
  2. BGlitch (hazard)
  3. CLatch-up
Show answer and explanation

Answer: B. Glitch (hazard)

When one input change reaches the output along paths with different delays, the output can briefly show a wrong value—a glitch (hazard). In synchronous circuits it is functionally harmless if it settles before the clock edge, but the extra switching wastes power. Glitches on clocks, asynchronous resets or control signals to other chips cause malfunctions, so such signals should come directly from flip-flop outputs.

Which type of sequential circuit (state machine) has outputs determined only by the current state?

  1. AMealy machine
  2. BMoore machine
  3. CHarvard machine
Show answer and explanation

Answer: B. Moore machine

In a Moore machine, outputs depend only on the current state; in a Mealy machine, they depend on both state and inputs. Moore outputs come straight from the state register, so they are glitch-free, stable and predictable, but respond a clock later and often need more states. Mealy machines need fewer states and react immediately, but input changes pass directly to the outputs. Real designs mix both styles.

  1. What is an advantage of a synchronous circuit, in which all flip-flops operate on a common clock?
  2. Intending combinational logic, someone wrote the code above. What problem can occur?
  3. Which coding style is commonly used to prevent unintended latches in combinational always blocks?

Practice Logic circuits questions

Key terms explained

Combinational circuit
A logic circuit whose output depends only on its current inputs. Examples include adders, multiplexers and decoders.
Sequential circuit
A logic circuit that stores state in flip-flops and the like, so its output depends on both inputs and past state. Examples include counters and registers.
Flip-flop
The basic element of sequential circuits that stores one bit. A D flip-flop captures its input at a clock edge.

Related comparisons