Besides the next-state equations, every FSM with outputs needs an output equation for each output. It's the logic between the state register (and maybe the inputs) and the output pins.
- Moore: the output depends only on the state, so the equation uses only state bits. If the output is 1 in state
11alone, Z = . - Mealy: the output also depends on the inputs, so the equation includes input variables, for example Z = .
That gives the fastest way to tell the two apart: if an input appears in the output equation, the machine is Mealy.
To derive one, take the output column of the encoded state table, mark unused codes as don't-cares, and simplify. For a one-hot Moore machine it's even simpler: the output is just the OR of the flip-flops for the states where it's 1.
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |