How Do You Design a Moore Machine for a Specific Output Sequence?

AI Thread Summary
A Moore machine is designed to output '1' when the input sequence '011' is detected, remaining '1' until the sequence occurs again, which resets the output to '0'. The initial design presented has issues with states producing different outputs, which violates Moore machine principles where outputs depend solely on states. To resolve this, additional states may be required to ensure each state consistently produces a single output. The suggested approach involves defining substates that correspond to the output conditions, allowing for clearer state transitions. Properly structuring the state table and ensuring unique outputs per state will correct the design flaws.
Morpho23
Messages
1
Reaction score
0
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:
Physics news on Phys.org
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:
Back
Top