0% found this document useful (0 votes)
310 views15 pages

Mealy and Moore Machines

The document discusses the differences between Mealy and Moore machines. Mealy machines have outputs that depend on both the present state and current inputs, while Moore machines only have outputs that depend on the present state. An example Mealy machine is given to detect the input sequence "010" along with its state table and assignment of states to variables. An example Moore machine is also provided to detect the input sequence "010" with its state table and assignment of states to variables. The solutions for the next state and output functions are determined using K-maps for both examples.

Uploaded by

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

Mealy and Moore Machines

The document discusses the differences between Mealy and Moore machines. Mealy machines have outputs that depend on both the present state and current inputs, while Moore machines only have outputs that depend on the present state. An example Mealy machine is given to detect the input sequence "010" along with its state table and assignment of states to variables. An example Moore machine is also provided to detect the input sequence "010" with its state table and assignment of states to variables. The solutions for the next state and output functions are determined using K-maps for both examples.

Uploaded by

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

Mealy and Moore Machines

Mealy Machines
Sequence to be detected : 010



State Table
Present State Next State Output
X=0 X=1 X=0 X=1
S0 S1 S0 0 0
S1 S1 S2 0 0
S2 S1 S0 1 0
STATE ASSIGNMENT
1. Pair the present state for which the next state is same for X=0 and X=1
2. Pair the next state for the present state. For eg: for S0 the next states
would be S1 and S2. Hence pair of (1,2) will be formed.
3. Pair the present states for which the output value is equal to 1
State Assignment
According to the State assignment rules, pairs formed will be:
1. For X=0, (0,1,2) and for X=1 (0,2) will be paired
2. no pairing is possible
3. (2) single pair



S0 = 00
S1 = 10
S2 =01


0 1
0 S0 S1
1 S2 --
Q1
Q2
State table
Present state Next State Output (z)
X=0 X=1 X=0 X=1
Q1 Q2 Q1+ Q2+ Q1+ Q2+
0 0 1 0 0 0 0 0
1 0 1 0 0 1 0 0
0 1 1 0 0 0 1 0
Now solve for Q1+ and Q2+ and output z using K maps.
K map Solution
For Q1+
Q1 Q2 00 01 11 10
X 0 Q1+ = X

1

For Q2 +
Q1 Q2
00 01 11 10 Q2+ = X Q1
X
0

1
1 1 x 1
x
X
x 1
Output and hardware implementation
Value of output z =
Q1Q2 00 01 11 10
X 0

1
Z= X Q2
X
1 x
Hardware implementation
2 flip flops are used as number of variables needed to
represent states are only two.

X

X

Z
D1 Q1
Q1
D2 Q2
Q2
Moore Machines
Output depends only upon the present state not on the
inputs. Pattern to be detected: 010
X=1
(1 is stored)

X=1 X=0 X=0
X=1
X=0 (0 is stored)
(010 is stored)
X=0 X=1
(01 is stored)
S0
0
S1
0
S2
0
S3
1
State Table
4 states are used.





Assignment of States
1. (0,1) and (0,2)
2.
3. (3)


Present State Next State Output
X=0 X=1 X=0/1
S0 S1 s0 0
S1 S1 S2 0
S2 S3 S0 0
S3 S1 S0 1
K Map
Assignment of states
Q1 0 1 S0 : 00
Q2 0 S1 : 10
1 S2 : 01
S3 : 11

S0 S1

S2 S3
State table
Present state Next State
X=0 X=1
Output
(z)
Q1 Q2 Q1+ Q2+ Q1+ Q2+
0 0 1 0 0 0 0
1 0 1 0 0 1 0
0 1 1 1 0 0 0
1 1 0 0 1 0 1
Solution for Q1+ and Q2+
Q1+ : Q1Q2 00 01 11 10
X 0

1

D1 = X Q2 + X Q1 + X Q1 Q2
Q2+ :



D2 = X Q1 Q2 + X Q1 Q2
1 1 1


1
1
1
Solution for K map
Since it is the moore machine only at the state output
shall be equal to 1 and Z is independent of input
variable X.
Z = Q1 Q2
Hardware Implementation

You might also like