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

Lecture 7-8 - Mealy Moore Machines - II

Lecture 7-8 - Mealy Moore Machines - II

Uploaded by

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

Lecture 7-8 - Mealy Moore Machines - II

Lecture 7-8 - Mealy Moore Machines - II

Uploaded by

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

TODAY’S TOPIC

 Moore Machines

 Mealy Machines

2
INTRODUCTION
o Finite automata may have outputs
corresponding to each transition.

o There are two types of finite state machines


that generate output

1. Moore Machine

2. Mealy Machine

3
INTRODUCTION
FA with Output

Moore Machine Mealy Machine

4
MOORE MACHINE VS. MEALY MACHINE

Moore Machine Mealy Machine


Output depends only upon the Output depends both upon the
present state. present state and the present
input
Generally, it has more states Generally, it has fewer states
than Mealy Machine. than Moore Machine.
The value of the output function The value of the output function
is a function of the current state is a function of the transitions
and the changes at the clock and the changes, when the
edges, whenever state changes input logic on the present state
occur. is done.

5
MOORE MACHINE

6
MOORE MACHINE
Moore machine is an FSM whose outputs depend on only
the present state.
It 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
7

q0 is the initial state


MOORE MACHINE
Moore machine is an FSM whose outputs depend on
only the present state.

X: Q → O

𝑝1 → 1
𝑝2 → 0 8
MOORE MACHINE
Example

𝑝1 → 1 𝑝2 → 0
Input String: ab

Input 𝒂 𝒃
States
𝑝1 𝑝1 𝑝2

1 1 0
9
Output
MOORE MACHINE
In Moore Machine if the string of length is ‘n’ as an
input, then the output produced will be a string of
length ‘n+1’

n → (n+1)
Example:

Input String: ab
Output String: 110

10
MEALY MACHINE

11
MEALY MACHINE
A Mealy Machine is an FSM whose output depends on the
present state as well as the present input.
It 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
12

q0 is the initial state


MEALY MACHINE
A Mealy Machine is an FSM whose output depends on
the present state as well as the present input.

X: Q × ∑ → O

(𝑝1 × a) → 1 (𝑝1 × b) → 0 13
MEALY MACHINE

(𝑝1 × a) → 1
(𝑝1 × b) → 0
(𝑝2 × a) → 1
(𝑝2 × b) → 0
14
MEALY MACHINE
Example

Input String: ab
Input 𝒂 𝒃
States
𝑝1 𝑝1 𝑝2

Output
1 0 15
MEALY MACHINE
In Mealy Machine, if the string of length is ‘n’ as an
input, then the output produced will be a string of
length ‘n’

n→n
Example:

Input String: ab
Output String: 10

16

You might also like