# Difference Between Mealy Machine and Moore Machine | Mealy vs Moore Machine

By Mohit Uniyal|Updated : May 2nd, 2022

Difference Between Mealy Machine and Moore Machine: The finite state machines(FSM) are divided into two categories first is the Mealy Machine and the second is Moore Machine. The mealy machine is the theory of computation whose outputs are decided by both its current state and inputs whereas the  Moore machine is the theory of computation whose outputs are decided only by its current state.

Here, we will first briefly explore Mealy Machine and Moore Machine and then we will discuss the complete exploration of the difference between the Mealy Machine and Moore Machine. We are going to elaborate on the differences in various parameters below.

## What is a Mealy Machine?

A mealy machine can be defined as a final state machine in the theory of computation whose output results are determined by its current state and inputs. In this type of machine at most one transition is possible. A Mealy machine can be described by a 6 tuple of Q, δ, Ʃ, O, X, and q0. Here:

q0 –  Very initial state, where (q0 ϵQ)

X – The transition function for output. Here, X: Q x Ʃ―>O

δ – The transition function for input. Here, δ:Q x Ʃ ―>Q

Ʃ – The set of finite symbols called input alphabets.

O – It is a set of finite symbols called output alphabets.

Q – is a finite set of states.

## What is the Moore Machine?

A Moore machine can be defined as a final state machine in the theory of computation whose output results are determined only by its current state. Every state of this finite state machine has its output symbol and its current state & input symbol are totally responsible for the next state. One can describe a Moore Machine by a 6 tuple of Q, δ, Ʃ, O, X, and q0. Here:

q0 – Very initial state, where (q0 ϵQ)

X – The transition function for output. Here, X: Q x Ʃ―>O

δ – The transition function for input. Here, δ:Q x Ʃ ―>Q

Ʃ – The set of finite symbols called input alphabets.

O – It is a set of finite symbols called output alphabets.

Q – is a finite set of states.

## What is the Difference Between Mealy Machine and Moore Machine?

As we have already seen a brief introduction to Mealy Machine and Moore Machine. We will now explore and discuss the difference between Mealy Machine and Moore Machine. The major differences between these two memories are explained in the table provided below:

 Difference Between Mealy Machine and Moore Machine Mealy Machine Moore Machine It is a machine whose current output is decided by its current state and the current external input and output symbol is connected to the transition state and input state. It is a machine whose current output is solely decided by its current state, and each state of a machine has an output symbol. This machine needs fewer states for the same functions' implementation. This machine has a more significant number of states for the same functions' implementation. This machine isn't straightforward to design as a Mealy machine. This is easy to design Moore's machine. These machines react to changes more quickly and all seem to respond in the same direction. Decoding the output requires more logic, the outcome in longer circuit delays. These machines usually react after one clock cycle. This machine requires less hardware for design. This machine requires more hardware for design. In a mealy machine, a counter can’t be referred In the Moore machine, A counter can be referred The output values become a function of transitions and change when the input logic is created in the present state. The output value becomes the function of its current state with the changes at the edges of the clock every time a change occurs in the state.

write a comment

## FAQs

• The major difference between Mealy Machine and Moore Machine is that the mealy machine is the theory of computation whose outputs values are decided by both its current state and inputs while the  Moore machine is the theory of computation whose outputs values are decided only by its current state.

• A mealy machine is a type of final state machine that can be defined in the theory of computation whose output values are determined by its current state and inputs. It is a type of machine in which at most one transition is possible. This machine can be described by a 6 tuple of Q, δ, Ʃ, O, X, and q0.

• A Moore machine is a type of final state machine that can be defined in the theory of computation whose output values are determined only by its current state. Every state of this machine has its output symbol and its current state & input are responsible for the next state. Moore Machine can describe by a 6 tuple of Q, δ, Ʃ, O, X, and q0.

• Yes, Mealy machines are faster  than a Moore machine because its state is dependent on the input values. Thus its state can change asynchronously whereas the Moore machines may be safer to use. After all, they can change the states on the clock edge.

• Yes, Mealy can be convert to Moore for converting Moore machine to Mealy machine, state output symbols or values are divided to input symbol paths. While converting the Mealy machine to Moore, we will have to create a separate state for each new output symbol and according to incoming and outgoing edges are divided.