Conversion From Mealy to Moore Machine

Let us take the transition table of the mealy machine shown in Figure 2.

  Input=0 Input=1
Present State Next State Output Next State Output
q0 q1 0 q2 0
q1 q1 0 q2 1
q2 q1 1 q2 0

Table 1

Step 1. First, find out those states which have more than 1 output associated with them. q1 and q2 are the states which have both output 0 and 1 associated with them.

Step 2 Create two states for these states. For q1, two states will be q10 (a state with output 0) and q11 (a state with output 1). Similarly, for q2, two states will be q20 and q21.

Step 3: Create an empty Moore machine with a newly generated state. For more machines, Output will be associated with each state irrespective of inputs.

  Input=0 Input=1  
Present State Next State Next State Output
q0      
q10      
q11      
q20      
q21      

Table 2

Step 4: Fill in the entries of the next state using the mealy machine transition table shown in Table 1. For q0 on input 0, the next state is q10 (q1 with output 0). Similarly, for q0 on input 1, the next state is q20 (q2 with output 0). For q1 (both q10 and q11) on input 0, the next state is q10. Similarly, for q1(both q10 and q11), next state is q21.  For q10, the output will be 0 and for q11, the output will be 1. Similarly, other entries can be filled.

  Input=0 Input=1  
Present State Next State Next State Output
q0 q10 q20 0
q10 q10 q21 0
q11 q10 q21 1
q20 q11 q20 0
q21 q11 q20 1

Table 3

This is the transition table of the Moore machine shown in Figure 1.

Mealy and Moore Machines in TOC

Moore and Mealy Machines are Transducers that help in producing outputs based on the input of the current state or previous state. In this article we are going to discuss Moore Machines and Mealy Machines, the difference between these two machines as well as Conversion from Moore to Mealy and Conversion from Mealy to Moore Machines.

Similar Reads

Moore Machines

Moore Machines are finite state machines with output value and its output depends only on the present state. It can be defined as (Q, q0, ∑, O, δ, λ) where:...

Mealy Machines

Mealy machines are also finite state machines with output value and their output depends on the present state and current input symbol. It can be defined as (Q, q0, ∑, O, δ, λ’) where:...

Moore Machines vs Mealy Machines

...

Conversion From Mealy to Moore Machine

Let us take the transition table of the mealy machine shown in Figure 2....

Conversion From Moore Machine to Mealy Machine

Let us take the Moore machine of Figure 1 and its transition table is shown in Table 3....

FAQs on Mealy and Moore Machines

1. Amongst Moore and Mealy Machine, which is easier to design?...