Skip to content
BetterDL

Initial state

Also called: reset state, start state, starting state

The state a finite state machine is in when it starts or is reset, before any inputs have been applied. Every trace begins here.

Every finite state machine needs a defined starting point: the initial state, also called the reset state. A state diagram marks it with an arrow from nowhere, or the question names it.

In hardware, flip-flops wake up holding unpredictable values, so the initial state is forced by a reset: an asynchronous clear or asynchronous preset on the state flip-flops, or a synchronous reset input that loads the starting code. Without one, the machine might start in any state, including unused codes.

The initial state is usually chosen to mean "nothing has happened yet":

  • a sequence detector starts in "no progress";
  • a vending machine starts at zero credit;
  • a counter starts at 0.

When tracing, always begin from the initial state, and remember a Moore machine already shows the initial state's output before the first input.

start010101S00S10S21

Worked example

Example

Same inputs, different starts

Trace the Moore 00 detector in the diagram on inputs 0, 1 from two different starting states.

  1. 1.

    From S0 (the initial state): 0 → S1 (output 0), 1 → S0 (output 0). Outputs 0, 0.

  2. 2.

    From S1 (as if a 0 had already arrived): 0 → S2 (output 1), 1 → S0 (output 0). Outputs 1, 0.

  3. 3.

    Same inputs, different outputs. Starting in the wrong state gives the wrong answer, which is why the reset state matters.

Common mistakes

  • Starting a trace from the first state drawn instead of the marked initial state.

  • Assuming flip-flops power up in the initial state by themselves. A reset has to put them there.

Practice Initial state

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

Learn it step by step

Initial state is taught in Finite State Machines.