Mealy Machines and Moore Machines are important computational models studied in the Theory of Computation and Automata. These machines help represent the behavior of computer systems and digital circuits through state diagrams. While both rely on transition functions, the method of generating output for a given input differs between them. This article covers the concepts of Mealy and Moore Machines, their diagrams, and a comparison of their characteristics.
Mealy Machine
Mealy Machine is defined as a machine in the theory of computation whose output values are determined by both its current state and current inputs. In this machine at most one transition is possible.
It has 6 tuples: (Q, q0, ∑, ▲, δ, λ’)
- Q is a finite set of states
- q0 is the initial state
- ∑ is the input alphabet
- ▲ is the output alphabet
- δ is the transition function that maps Q×∑ → Q
- ‘λ’ is the output function that maps Q×∑→ ▲
The diagram is as follows:

Moore Machine
Moore's machine is defined as a machine in the theory of computation whose output values are determined only by its current state. It has also 6 tuples
(Q, q0, ∑, ▲, δ, λ) - Q is a finite set of states
- q0 is the initial state
- ∑ is the input alphabet
- ▲ is the output alphabet
- δ is the transition function that maps Q×∑ → Q
- λ is the output function that maps Q → ▲
Diagram:

Difference Between Mealy Machine and Moore Machine
State machines such as Mealy and Moore play a vital role in digital system design and automata theory. To better understand their differences and real-world applications, the GATE CS Self-Paced Course provides in-depth lessons on finite automata and their practical use, making it an excellent resource for GATE aspirants.
The differences between the Mealy machine and Moore machine is as follows:
Moore Machine | Mealy Machine |
|---|---|
| Output depends only upon the present state. | Output depends on the present state as well as present input. |
| Moore machine also places its output in the state. | Mealy Machine places its output on the transition. |
| More states are required. | Less number of states are required. |
| Moore machines requires more hardware requirement for circuit implementation. | Mealy Machines requires less hardware requirement for circuit implementation. |
| They react slower to inputs(One clock cycle later). | They react faster to inputs. |
| Synchronous output and state generation. | Asynchronous output generation. |
| Output is placed on states. | Output is placed on transitions. |
| Easy to design. | It is difficult to design. |
| Has more or the same states as that of the Mealy machine. | Has fewer or the same states as that of the Moore machine. |