Skip to content
BetterDL

Next state

Also called: next-state value, following state

The state a sequential machine will move to at the next active clock edge, decided by its present state and its present inputs.

Every clocked machine works in two moments:

  • Between edges, it sits in its present state, and its logic works out where to go.
  • At the active edge, it moves to the next state, which then becomes the new present state.

In a state diagram, the next state is wherever the arrow for the current input leads. In a state table, it's the cell in the present state's row under the current input. In hardware, it's the value on the flip-flops' D inputs just before the edge, worked out by the next-state logic.

Notation: you'll often see Q⁺ (or Q(t + 1)) for the next value of a state bit Q.

For a counter with no inputs, each state has just one next state, so the sequence is fixed. For an FSM with inputs, the same present state can lead to different next states depending on the input.

The next state is decided by values just before the edge. An input that changes after the edge affects the following transition, not this one.

start010101S00S10S21

Worked examples

Example

Reading next states

Use the diagram (a Moore 00 detector). Find the next state in each case.

  1. 1.

    Present S0, input 0 → next state S1.

  2. 2.

    Present S1, input 1 → next state S0.

  3. 3.

    Present S2, input 0 → next state S2 (self-loop: the next state is the present state).

Example

Next state from an equation

A 2-bit counter with enable X has Q1⁺ = and Q0⁺ = . It's in Q1Q0 = 01 with X = 1.

  1. 1.

    Q1⁺ = 0 ⊕ (1·1) = 1.

  2. 2.

    Q0⁺ = 1 ⊕ 1 = 0.

  3. 3.

    Next state 10: it counted from 1 to 2 ✓.

Common mistakes

  • Using the input value after the edge. The next state depends on the input just before the edge.

  • Thinking a self-loop means "no next state". The next state is simply the same state.

Practice Next state

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

Learn it step by step

Next state is taught in Finite State Machines and Counters.