Finite State Machines: Differences between Mealy and Moore Machines?

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
Schfra
Messages
47
Reaction score
0
There are two types of finite state machines (at least that I know about), mealy and Moore.

What are the practical differences between them. I understand that mealy machines take the input into account for the output logic, but are the two machines used for different purposes? Or can the same thing be designed with either machine?

Can somebody clarify what the significance is if there being two different types of finite state machines, one that takes the input into account for output logic and one that does not?
 
Last edited by a moderator:
Engineering news on Phys.org
A Moore FSM has output which depend only on its current state. A Mealy FSM has output which are dependent on current state and the inputs. What this usually means in practice is a Moore FSM can only update its output on clock boundaries while a Mealy can change its output at any time.

For a contrived example: Say you wanted to run a very slow clock to save power but you also wanted to react to a fault quickly. In this case a Mealy FSM may be a good choice. The disadvantage of the Mealy FSM is they can be harder to implement and test. In the example given, one would have to take extra care to handle the cases where the fault signal was a runt pulse or toggled at a rate faster than the clock. Those are just two very common ones. There could be even more issues depending on the exact implementation details.
 
Last edited:
  • Like
Likes   Reactions: Schfra