# Moore Finite State Machine

1. Sep 23, 2008

### Morpho23

Here's the problem:

A Moore sequential circuit has one input and one output. When the input sequence '011' occurs, the output becomes '1' and remains '1' until the sequence '011' occurs again in which case the output returns to '0'. The output remains '0' until '011' occurs a third time, etc.

Example:

Input X:----0--1--0--1--1--0--1--0--1--1--0--1--0--0--1--1--1
Output Y:---0--0--0--0--1--1--1--1--1--0--0--0--0--0--0--1--1

Design the circuit.

Note: I'm a little confused on how to build a Moore circuit. I had something like this, but I'm afraid it's wrong because a couple of my states clearly have different outputs, which shouldn't happen in a Moore circuit. Since I can't draw the state diagram I'll give the state table.

-----------Next State--------Output-----
State--|--x = 0--x = 1--|--x = 0--x = 1
A---------B------A---------0-----0
B---------B------C---------0-----0
C---------B------D---------0-----1 <-----Problem, two different outputs...
D---------E------D---------1-----1
E---------E------F---------1-----1
F---------E------A---------1-----0 <-----Problem, two different outputs...

How do I fix those problems? Do I have to change my design, add additional state? If so what would they look like? Any suggestions....thanks.

Last edited: Sep 23, 2008
2. Sep 23, 2008

### Phrak

You have three states, each with two substates. It should make thinking easier to do it this way.

A --Waiting for first 1.
B --Waiting for second 1.
C --Waiting for zero.

The substates are

0 --Output is a zero.
1 --Output is a one.

For example:

State A0: If input=0 goto state A0. (output=0)
State A0: If input=1 goto state B0. (output=0)

State A1: If input=0 goto state A1. (output=1)
State A1: If input=1 goto state B1. (output=1)

The output bit is one of the three wrap-around bits (the substate bit), so if you have 4 output bits available, you can either use the substate bit as output of our duplicate it.

Last edited: Sep 23, 2008