Software → Digital Logic
Finite State Machine
A model of computation made of states, transitions, inputs, and outputs.
Motivation
Finite State Machine solves the problem of modeling behavior with a limited set of states and transitions.
Where it fits
Finite State Machine appears in digital logic, protocols, parsers, UI flows, and control systems.
Mental model
An FSM is a diagram of allowed states and what events move the system between them.
Common mistakes
- Adding too many hidden states outside the model.
- Using an FSM for problems requiring unbounded memory.
Related concepts
Finite State Machine connects to finite automaton, state, event, protocol, and sequential logic.