Differences in Moore and Mealy Machine

Both Moore and Mealy Machines accept the regular languages and provide the output. There are some basic differences between Moore and Mealy Machines. Let explain,

Sr. Moore Machine Mealy Machine
1.      Output in Moore Machine is placed within each state.  Output in Mealy Machine is placed in each transition. 
2.      The output of the Moore Machine depends only upon the present state.  Output depends on the present state as well as the present input.
3.      λ is the output function which maps Q → O. Where Q is state, and O is output. ‘λ’ is the output function which maps Q×→ O. Where Q is state, and O is output.
4.      If input changes, output does not change because output depends on the State.  If input changes, output also changes because output depends on State and input. 
5.      After conversion from Moore to Mealy machine, state numbers always decrease. The number of states can increase after conversion from Mealy to Moore machine.
6.      Output is synchronized with the clock. Moore Machines react slower to inputs (1 clock cycle later).  Output is not synchronized with the clock. Mealy Machines react faster to inputs.
7.      It is Easy to design.  It is difficult to design. 
8.      If the length of the input string is “N”, then the length of the output string is “N+1”. If the length of the input string is “N”, then the length of the output string is also “N”.

An example Diagram of the Moore Machine is given below

Example of Automata Moore Machine to find first complement

An example Diagram of the Mealy Machine is given below

Examples of Mealy Machine to find first complement