Skip to content
BetterDL

State transition

Also called: state transitions, transition arrow, FSM transition

A move from one state to another, or back to the same state, at an active clock edge, drawn as a labeled arrow in a state diagram.

A state transition is one step of a finite state machine: at an active clock edge the machine leaves its present state and enters its next state. In a state diagram each transition is an arrow, labeled with the input that selects it (and, for a mealy machine, the output produced along the way).

Three rules keep transitions straight:

  • Exactly one per edge. At each clock edge the machine takes exactly one transition. Even "staying put" is a transition, a self loop.
  • One per input value. In a complete diagram, every state has one outgoing transition for each input combination, so the next step is never ambiguous.
  • One-way. An arrow from S0 to S1 says nothing about how to get back.

Tracing a machine means following transitions one input at a time, starting from the initial state, and writing down the state after every step.

start0101Even1Odd0

Worked example

Example

Counting transitions

The diagram (even number of 0s) starts in Even and receives 1, 1, 0, 1.

  1. 1.

    Edge 1, input 1: Even → Even (self-loop).

  2. 2.

    Edge 2, input 1: Even → Even.

  3. 3.

    Edge 3, input 0: Even → Odd.

  4. 4.

    Edge 4, input 1: Odd → Odd.

  5. 5.

    Four inputs, four transitions, even though the state changed only once.

Common mistakes

  • Skipping self-loops while tracing. Each one still uses up an input and a clock edge.

  • Taking two arrows for one input because the first one "didn't change anything".

  • Following an arrow backward.

Practice State transition

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

Learn it step by step

State transition is taught in Finite State Machines.