Courses / Computer Science I
Basic Digital Design

Sequential Logic and State

Computer Science I 197 words Free to read

Circuits That Remember

Combinational circuits are memoryless, but a computer must remember. Sequential logic adds state, meaning the circuit's output depends on current inputs and stored past information.

Memory comes from feedback, wiring an output back to an input. A latch is the simplest memory element, storing one bit that can be set to 1 or reset to 0.

ConceptCombinationalSequential
MemoryNoneUses feedback
TimingContinuousClock-driven
OutputInputs onlyInputs and state

Real designs are synchronous, governed by a clock ticking at a fixed rate. State updates happen only at a clock edge (rising or falling transition).

Finite State Machines

A finite state machine (FSM) consists of a set of states, plus rules to determine the next state and outputs. Examples include traffic lights and CPUs.

next state=f(state,input)\text{next state} = f(\text{state}, \text{input})

Here, state\text{state} is held by the state register, while combinational logic computes the next state.

Common pitfall: Thinking a sequential circuit responds continuously. In synchronous designs, state changes only at clock edges, advancing one step per tick.
Sequential Logic and State

Practise this lesson

The explanation above is free to read. The graded practice for this lesson lives in the Tryals app.

10practice questions
2interactive scenes

Basic Digital Design