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,
|Output in Moore Machine is placed within each state.
|Output in Mealy Machine is placed in each transition.
|The output of the Moore Machine depends only upon the present state.
|Output depends on the present state as well as the present input.
|λ 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.
|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.
|After conversion from Moore to Mealy machine, state numbers always decrease.
|The number of states can increase after conversion from Mealy to Moore machine.
|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.
|It is Easy to design.
|It is difficult to design.
|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
An example Diagram of the Mealy Machine is given below