# Mealy Machines

Discussion in 'Homework Help' started by v2rocketboy, Apr 18, 2011.

1. ### v2rocketboy Thread Starter New Member

Apr 1, 2011
7
0
Hi all, for a homework question I need to make a sequence detecter out of a mealy machine, I AM NOT ASKING ANYONE TO DO THIS FOR ME..SO PLEASE DO NOT!

What I wan't is could someone give me a bit of explanation on Mealy machines and designing, finite state machines in general, I understand moore machines and how to draw them, but when we got to mealy in class I got kinda baffled.

Also what is the easiest way to solve these types of problems ie) go straight to drawing diagrams, or tables?

Any help would be greatly appreciated.

2. ### Georacer Moderator

Nov 25, 2009
5,142
1,266
Check out this complete tutorial on Moore FSMs:

The only difference between the Moore and the Mealy machines is that the output is dependant on the inputs too. Consequently, where I have put double 1s on the table of step 4, in the column of the output Y, you should fill it in the way you want.

3. ### v2rocketboy Thread Starter New Member

Apr 1, 2011
7
0
Ah so the table should stay the same I should just vary the outputs dependant on the type of machine and the problem I have to solve? I.e the mealy or the more and my sequence detector problem.

Btw thankyou for your help, I think you also replied on another post of mine, your help has not gone to waste

4. ### Georacer Moderator

Nov 25, 2009
5,142
1,266
Yes, that's what I said. The output Y is the only actual difference.
Keep in mind that the output must be valid throughout the clock cycle (not just when the clock rises/falls) for the output to be valid too.

5. ### v2rocketboy Thread Starter New Member

Apr 1, 2011
7
0
I need to have two inputs on a mealy machine im designing, can I have two inputs in the diagram? like what is the standard thing to do

6. ### Georacer Moderator

Nov 25, 2009
5,142
1,266
In your state table, you should have as many columns under the input section as the number of your system inputs. Of course, for every extra input you add, the height of the table will be twice as long.

Also, an important detail is that your state diagram changes too. If you have 2 system inputs, a maximum of 4 different arrows can begin from each state (representing inputs 00, 01, 10 and 11). For 3 inputs, up to 8 arrows will derive from each state.

The algorithm doesn't change though, once you have your state table right.

Is that clear?