Lecture 7
Lecture 7
Lecture 7
• Moore Machines
• Mealy Machines
• An application
A bit of History...
• Moore Machines and Mealy Machines are two models for FA's with
output.
• Mealy Machines were created by G. H. Mealy in 1955 while Moore
Machines were created (independently) by E. F. Moore in 1956.
• The original purpose of the inventors was to design a mathematical
model for sequential circuits.
Moore Machines - Definition
a b
q0/1 q1/0
b a
a
b
q2/0 q3/1 a
b
Trace the operation of this machine on the input string
abab.
A Moore string counter for ‘aab’…
b a
a b
q0/0 q1/0 q2/0 q3/1
b
a
b
This moore machine will count exactly how many times the
substring aab occurs in a long input string. Trace the
operation of this machine on the string aaababbaabb.
Mealy Machines - Definition
a/0 q1 b/1
a/1
q0 q2
b/0 a/0
b/1
q3
b/1
a/1
Some useful Mealy machines
0/0, 1/1
no
carry
0/1
0/1
start
owe
carry
1/0 1/0
Trace the operation of this Mealy machine on the binary representation
of decimal 11.
How can we build a subtracting machine from the two example Mealys?
An Application – using a Mealy machine to
represent a sequential circuit
• DELAY => D-flip flop delays the transmission of the signal along the wire by one step
(clock pulse)
Example sequential circuit
input A B output
NAND DELAY OR
OR
State representation of circuit
A B
q0 0 0
q1 0 1
q2 1 0
q3 1 1
Circuit Logic
q0 q2 0 q2 1
q1 q2 1 q0 1
q2 q3 0 q1 1
q3 q3 1 q1 1
Transition Diagram
1/1
1/1 0/0
q3
0/1
Summary