# Difference Between Mealy Machine and Moore Machine

By Mohit Uniyal|Updated : October 5th, 2022

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

Difference Between Mealy Machine and Moore Machine PDF

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

## Difference Between Mealy Machine and Moore Machine

The major difference between Mealy Machine and Moore Machine is that a Mealy machine is a machine whose current output is decided by its current state. The current external input and output symbol is connected to the transition and input states. Whereas Moore machine is a machine whose current output is solely decided by its current state, and each state of a machine has an output symbol. These machines are an important part of the GATE CSE syllabus, and over the years, various questions related to these concepts can be seen in the exam.

### Key Differences Between Mealy Machine and Moore Machine

 Mealy Machine Moore Machine 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.

## 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. This transition is important for the GATE exam. 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, which carries a good marks weightage in the GATE question paper, 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 is 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.

Check out the important topics related to key differences between Mealy Machine and Moore Machine mentioned below:

 Related GATE Articles Difference Between Virtual Machines and Containers Difference between Keyword and Identifier Difference Between Symmetric and Asymmetric Key Encryption Difference Between Constructor and Method in Java Difference between Interface and Class in Java Difference Between Mutable and Immutable

write a comment

## FAQs on Difference Between Mealy Machine and Moore Machine

• 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, As per the difference between Mealy Machine and Moore Machine, Mealy machines are faster than the Moore machine because their 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.

### GATE & PSU CS

Computer ScienceGATEGATE CSENIELITOther ExamsQuick LinksMock Test