Finite-State Machines (FSMs)
Sequential digital systems differ from combinational systems because they store state in internal memory elements. Their outputs depend both on the current inputs and the stored state. Sequential systems are described as finite-state machines (FSMs) rather than truth tables.
1. Definition of a Finite-State Machine
Components of an FSM:
- Set of states: Represents all possible values of the system’s internal memory.
- If n bits of storage → 2ⁿ possible states
- Next-state function: Combinational logic that computes the next state from the current state and inputs.
- Output function: Produces outputs from the current state (and possibly the inputs).
Synchronous FSMs:
- State changes occur on clock edges.
- Widely used in processors and control systems.

2. Types of FSMs
| FSM Type |
Output Depends On |
Notes |
| Moore Machine |
Current state only |
Typically faster; outputs change only on state transitions |
| Mealy Machine |
Current state + inputs |
Often smaller; may need fewer states |
- Moore and Mealy machines are equivalent in capability and can be converted between each other.
Look up Moore vs. Mealy comparison for additional understanding.
3. Example: Traffic Light Controller
Scenario: