next up previous contents index

[ENGN3213 Home]

Formal Definition of Finite State Machines

  We know that combinational logic circuits are described formally using Boolean algebra, a mathematical formalism. State machines are also described in mathematical terms, as follows.

Finite sets:

  These sets can be symbolic, not necessarily binary. E.g.

\begin{displaymath}X = \{ {\rm\ up, \ down, \ stop } \ \}

These values or symbols reflect the meaning of the state machine specification. For binary implementation we would use a binary encoding.


The function f is called the next state function, and h is called the output function.

  Equations. Moore machine:

 \begin{displaymath}% latex2html id marker 95
s(t+1) & = f(s(t)...
z(t) & = h(s(t)) \ \ \ \ {\rm - output \ equation}
\end{array}\end{displaymath} (3)

  Equations. Mealey machine:

 \begin{displaymath}% latex2html id marker 106
s(t+1) & = f(s(t...
... & = h(s(t),x(t)) \ \ \ \ {\rm - output \ equation}
\end{array}\end{displaymath} (4)

In these equations t indicates time, and so the equations specify how the value of the state s=s(t+1) at time t+1 is determined by the state value s=s(t) at time t and the input x=x(t) at time t. The equations are a description of the sequential operation of the machine. The outputs are specified in either of two ways, corresponding to the names Moore machine and Mealey machine. The only difference is that a Mealey output may depend explicitly on the current input value x(t) whereas a Moore output depends only on the current state s(t).

The FSM black-box model is illustrated in Figure 50.

Figure 50: Finite state machine (FSM).

Example. For the Up/Down/Stop counter, we have

X & = \{ {\rm\ up, \ down, \ stop } \ \} \\...
..., \ s4 } \ \} \\
Z & = \{ {\rm\ odd, \ even } \ \}

Example. For the vending machine controller, we have

X & = \{ {\rm\ coins, \ return, \ change-av...
...e-candy, \ return-all-coins, \ return-change } \ \}

next up previous contents index

[ENGN3213 Home]

ANU Engineering - ENGN3213