0% found this document useful (0 votes)
160 views22 pages

Mealy Moore

- Moore machines are finite state machines where the output depends only on the present state. Mealy machines are also finite state machines where the output depends on both the present state and current input. - To convert a Mealy machine to a Moore machine, any states that have multiple outputs are split into multiple states, with each new state corresponding to a single output. The transition table and outputs are then filled accordingly. - To convert a Moore machine to a Mealy machine, the output is associated with each state-input pair instead of just the state. The transition table and outputs can be directly constructed from the Moore machine definition. Redundant states may then be eliminated.

Uploaded by

GRIMHEART REAPER
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
160 views22 pages

Mealy Moore

- Moore machines are finite state machines where the output depends only on the present state. Mealy machines are also finite state machines where the output depends on both the present state and current input. - To convert a Mealy machine to a Moore machine, any states that have multiple outputs are split into multiple states, with each new state corresponding to a single output. The transition table and outputs are then filled accordingly. - To convert a Moore machine to a Mealy machine, the output is associated with each state-input pair instead of just the state. The transition table and outputs can be directly constructed from the Moore machine definition. Redundant states may then be eliminated.

Uploaded by

GRIMHEART REAPER
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

• Moore machines are finite state machines with output value and its

output depends only on present state.

• Mealy machines are also finite state machines with output value and
its output depends on present state and current input symbol.
Example: Mealy Machine
• Design Mealy machine for 1’s compliment of a binary number
Example: Mealy Machine
• Design Mealy machine for regular expression (0+1)*(00+11)
Conversions
Mealy to Moore
Steps:
• Step 1. First find out those states which have more than 1 outputs
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 (state with output 0) and q11 (state with
output 1). Similarly for q2, two states will be q20 and q21.
• Step 3. Create an empty moore machine with new generated state.
For moore machine, Output will be associated to each state
irrespective of inputs.
• Step 4: Fill the entries of next state using mealy machine transition
table.
• For q0 on input 0, next state is q10 (q1 with output 0). Similarly, for q0 on
input 1, next state is q20 (q2 with output 0).
• For q1 (both q10 and q11) on input 0, next state is q10. Similarly, for q1(both
q10 and q11), next state is q21.
• For q10, output will be 0 and for q11, output will be 1. Similarly, other entries
can be filled.
Moore to Mealy
• Step1:
Construct an empty mealy machine using all states of moore machine
• Step2:
Next state for each state can also be directly found from moore machine
transition
• Step 3:
As we have output corresponding to each input in moore machine
transition table , use this to fill the Output entries .
Eg:Output corresponding to q10, q11, q20 and q21 are 0, 1, 0 and 1
respectively.
Input=0 Input=1
Present St
Next State Output Next State Output
ate
q0 q10 q20
q10 q10 q21
q11 q10 q21
q20 q11 q20
q21 q11 q20
• Step4:
As we can see from table, q10 and q11 are similar to each other
(same value of next state and Output for different Input). Similarly, q20
and q21 are also similar. So, q11 and q21 can be eliminated.
Mealy to Moore Conversion- Example

NEXT STATE OUTPUT NEXT STATE OUTPUT


A A 0 B 1
B B 1 B 0

NEXT NEXT OUTPUT


STATE/0 STATE/1
A0 A0 B1 0
B1 B1 B0 1
B0 B1 B0 0
Moore to Mealy Conversion

You might also like