Professional Documents
Culture Documents
Moore Machine
Moore Machine
Moore Machine
Definition
Moore Machine
Moore machine is a FSM (finite state machine) whose outputs
depend on only the present state.
A Moore machine can be described by a 6 tuple:
(Q, ∑, O, δ, X, q0)
where
Q is a finite set of states.
∑ is a finite set of symbols called the input alphabet.
O is a finite set of symbols called the output alphabet.
δ is the input transition function where δ: Q × ∑ → Q
X is the output transition function where X: Q → O
q0 is the initial state from where any input is processed (q0 ∈ Q).
Moore Machine - Example
Input: abab
Output: 10010
Processing:
a b a b
q0 q1 q1 q3 q2
1 0 0 1 0
Application: Construct a Moore Machine that takes binary
number as input and produces its 1’s complement
Transition Table
State input output
0 1
q0 q1 q0 0
q1 q1 q0 1
Processing for input: 011001
0 1 1 0 0 1
q0 q1 q0 q0 q1 q1 q0
0 0 0 1 1 0
1
Application: Construct sequential circuit (AND Gate) using
Moore Machine.
Application: Pattern Recognition Using
Moore Machine.
Suppose we were interested in knowing exactly how many
times the substring aab occurs in a long input string.The
following Moore machine will print ‘1’ as output for every
occurrence of ‘aab’ as substring.
Class Activity.
Design following Moore Machines:
1. Construct Moore Machine that takes a binary input and
produces 2’s complement as output.
2. Construct Moore Machine for OR, NOT and XOR Gates.
3. Construct Moore Machine that takes set of all string over
alphabet { a, b} as input and prints ‘1’ as output for every
occurrence of ‘ab’ as substring.