1 Moore machine and Mealy machine (P.274) Mealy machine: created by G. H. Mealy, 1955 Moore machine:...

Post on 02-Jan-2016

249 views 4 download

Tags:

Transcript of 1 Moore machine and Mealy machine (P.274) Mealy machine: created by G. H. Mealy, 1955 Moore machine:...

1

Moore machine and Mealy machine (P.274)

Mealy machine: created by G. H. Mealy, 1955Moore machine: created by E.F. Moore, 1956

2

Moore machine and Mealy machine (P.274)

Mealy machine: created by G. H. Mealy, 1955Moore machine: created by E.F. Moore, 1956

Purpose: to design a mathematical model for sequential circuits.

3

Moore machine and Mealy machine (P.274)

Mealy machine: created by G. H. Mealy, 1955Moore machine: created by E.F. Moore, 1956

Purpose: to design a mathematical model for sequential circuits.

Definition: A Moore machine is a collection of five things

4

Moore machine and Mealy machine (P.274)

Mealy machine: created by G. H. Mealy, 1955Moore machine: created by E.F. Moore, 1956

Purpose: to design a mathematical model for sequential circuits.

Definition: A Moore machine is a collection of five things1.A finite set of states qo q1 q2 … qo is the start state.

5

Moore machine and Mealy machine (P.274)

Mealy machine: created by G. H. Mealy, 1955Moore machine: created by E.F. Moore, 1956

Purpose: to design a mathematical model for sequential circuits.

Definition: A Moore machine is a collection of five things1.A finite set of states qo q1 q2 … qo is the start state.2.An alphabet of letters for forming the input string Σ = {a, b, c, … }

6

Moore machine and Mealy machine (P.274)

Mealy machine: created by G. H. Mealy, 1955Moore machine: created by E.F. Moore, 1956

Purpose: to design a mathematical model for sequential circuits.

Definition: A Moore machine is a collection of five things1.A finite set of states qo q1 q2 … qo is the start state.2.An alphabet of letters for forming the input string Σ = {a, b, c, … }3.An alphabet of possible output characters Γ = {x, y, z, … }

7

Moore machine and Mealy machine (P.274)

Mealy machine: created by G. H. Mealy, 1955Moore machine: created by E.F. Moore, 1956

Purpose: to design a mathematical model for sequential circuits.

Definition: A Moore machine is a collection of five things1.A finite set of states qo q1 q2 … qo is the start state.2.An alphabet of letters for forming the input string Σ = {a, b, c, … }3.An alphabet of possible output characters Γ = {x, y, z, … }4.A transition table that shows for each state and each input letter what state is reached next.

8

Moore machine and Mealy machine (P.274)

Mealy machine: created by G. H. Mealy, 1955Moore machine: created by E.F. Moore, 1956

Purpose: to design a mathematical model for sequential circuits.

Definition: A Moore machine is a collection of five things1.A finite set of states qo q1 q2 … qo is the start state.2.An alphabet of letters for forming the input string Σ = {a, b, c, … }3.An alphabet of possible output characters Γ = {x, y, z, … }4.A transition table that shows for each state and each input letter what state is reached next.5.An output table that shows what character from Γ is printed by each state as it is entered

9

Moore machine Transition and output table

Old State

qo

q1

q2

q3

Old State

1

0

0

1

Input a

q1

q3

q0

q3

Input b

q3

q1

q3

q2

Output by the New State

10

Moore machine – the pictorial representation

qo /1

q2 /0 q3 /1

a

aa b

b

b

q1 /0

b

a

11

Moore machine – example Input: a b b a Output:

qo /1

q2 /0 q3 /1

a

aa b

b

b

q1 /0

b

a

12

Moore machine – example Input: a b b a Output: 1

qo /1

q2 /0 q3 /1

a

aa b

b

b

q1 /0

b

a

13

qo /1

q2 /0 q3 /1

a

aa b

b

b

q1 /0

b

a

14

qo /1

q2 /0 q3 /1

a

aa b

b

b

q1 /0

b

a

15

qo /1

q2 /0 q3 /1

a

aa b

b

b

q1 /0

b

a

16

qo /1

q2 /0 q3 /1

a

aa b

b

b

q1 /0

b

a

17

qo /1

q2 /0 q3 /1

a

aa b

b

b

q1 /0

b

a

18

qo /1

q2 /0 q3 /1

a

aa b

b

b

q1 /0

b

a

19

qo /1

q2 /0 q3 /1

a

aa b

b

b

q1 /0

b

a

20

qo /1

q2 /0 q3 /1

a

aa b

b

b

q1 /0

b

a

21

qo /1

q2 /0 q3 /1

a

aa b

b

b

q1 /0

b

a

1. No final state2. Output is always

one letter more than the input

22

Mealy machine

Definition: A Mealy machine is a collection of four things1.A finite set of states qo q1 q2 … qo is the start state.2.An alphabet of letters for forming the input string Σ = {a, b, c, … }3.An alphabet of possible output characters Γ = {x, y, z, … }4.A pictorial representation with states represented by small circles and directed edges indicting transitions between states. Each edge is labeled with a compound symbol of the form i/o.

23

Example: input abba output 0111

q0 q2

q3

q1

a/0

b/1

b/1

a/1

a/1

a/0b/0

b/1

24

FSA NFSA Moore Mealy

Start State 1 1 1 1

Final State some or 1 some or 1 none none

Edge Labels letters letters letters i/o

# of edges 1 for @ letter arbitrary 1 for @ letter 1 for @ letter

Deterministic yes no yes yes

Output no no yes yes