Moore and Mealy machines

Irfan Anjum
Irfan AnjumLecturer at University of Central Punjab, Lahore em University of Central Punjab, Lahore
Finite-State Machine

Muhammad Irfan Anjum

1
OUTLINE

•

Introduction

•

Types of Finite State Machines
•
•

•

Mealy State Machine
Moore State Machine

Example

2
Finite State Machine

• FSMs are different from counters in the sense that they
have external I/Ps, and state transitions are dependent on
these I/Ps and the current state.
• Simple forms of pattern matching.
• Models for sequential logic circuits, of the kind on which
every present-day computer and many device controllers is
based.
3
Mealy and Moore Machines

External I/Ps

External
I/Ps
m1

External O/Ps

m1

Comb.
Logic

n

FFs

m2

Next State
Comb.
Logic

n even
↓
odd

n

Output
Logic

CLK

m2

FFs

n

CLK
External Outputs

Moore Machine Model

Mealy Machine Model
4
Difference Between Mealy and Moore Machine
Mealy
(1) O/Ps depend on the present
state and present I/Ps
(2) The O/P change asyn
-chronously with the
enabling clock edge

(3)
(4)

Moore
O/Ps depend only on the
present state
Since the O/Ps change
when the state changes,
and the state change is
synchronous with the
enabling clock edge, O/Ps
change synchronously
with this clock edge
A counter is a Moore
machine

A counter is not a Mealy
machine
A Mealy machine will have
the same # or fewer states
than a Moore machine
5
Finite State Machine (FSM) Design
Example:
There is a one bit-serial I/P line. Design an FSM that outputs a ‘0’ if an
even # of 1’s have been received on the I/P line and the outputs a ‘1’
otherwise.
x

FSM

O/p y
CLK

CLK

x
# of
1s

even
(0)

odd
(1)

even
(2)

odd
(3)
6

odd
(3)
Solution 1: (Mealy)

Solution 2: (Moore)
0

0/0

Reset
Even

Transition
Arc

Input

1/1

1/0
Odd

Reset

Output

Even

Output

[0]
O/P is dependent
on current state and
input in Mealy

1

1
Odd
[1]

0

0/1
Mealy Machine: Output is associated
with the state transition, and appears
before the state transition is completed
(by the next clock pulse).

Input
Output is
dependent only
on current state

Moore Machine: Output is associated
with the state and hence appears
after the state transition take place.
7
State Transition Table
(Even-Parity Checker)
Even State: 0 ;
Present
State

Input

A

Odd State: 1;
Next
State

x

State Variable A
Mealy
O/P

Moore
O/P

A+

y1

D-FF
Excit.

y2

DA

0

0

0

0

0

0

0

1

1

0

1

1

1

1

0

1x

1
0
Input variables
to comb. logic
1

1

DA= A⊕x ;
y1 = A for Moore
y2 = A⊕x for Mealy

Output functions 1
1
y2

0
N.S. & O/P
Logic

Q
A FF

x

N.S.
Logic

Or

Q

DA

CLK
8

0

A
O/P
Logic

FFs

y1

DA
Moore M/C Implementation

a) D-FF
0

D

x=1

R

CLK

A

Q

y1

Q

Reset

Moore O/P is synchronized with clock.

Mealy M/C Implementation
y2

0

1

D

x=1
CLK

Q
R

A

Q

Reset

a) D-FF
Mealy O/P is not synchronized with clock.
9
Moore M/C Implementation

a) D-FF
0

D

x=1

R

CLK

A

Q

y1

Q

Reset

Moore O/P is synchronized with clock.

Mealy M/C Implementation
y2

0

1

D

x=1
CLK

Q
R

A

Q

Reset

a) D-FF
Mealy O/P is not synchronized with clock.
9
1 de 10

Recomendados

Finite state automatonFinite state automaton
Finite state automatonAmmAr mobark
5.3K visualizações24 slides
Latches and flip flopLatches and flip flop
Latches and flip flopShuaib Hotak
8.5K visualizações30 slides
Meley & mooreMeley & moore
Meley & mooreArif Siyal
12.8K visualizações8 slides
Moore and mealy machineMoore and mealy machine
Moore and mealy machineMian Munib
30.7K visualizações21 slides
Finite state machinesFinite state machines
Finite state machinesdennis gookyi
13.9K visualizações18 slides
Introduction state machineIntroduction state machine
Introduction state machineShreyans Pathak
17.5K visualizações51 slides

Mais conteúdo relacionado

Mais procurados

FlipflopFlipflop
Flipflopsohamdodia27
64.6K visualizações33 slides
Combinational circuits Combinational circuits
Combinational circuits DrSonali Vyas
20.1K visualizações21 slides
Switch level modelingSwitch level modeling
Switch level modelingDevi Pradeep Podugu
20.4K visualizações29 slides
Sequential circuitsSequential circuits
Sequential circuitsDrSonali Vyas
6.9K visualizações32 slides
Mealy and moore machinesMealy and moore machines
Mealy and moore machinesgrahamwell
5.7K visualizações10 slides

Mais procurados(20)

FlipflopFlipflop
Flipflop
sohamdodia2764.6K visualizações
Combinational circuits Combinational circuits
Combinational circuits
DrSonali Vyas20.1K visualizações
Switch level modelingSwitch level modeling
Switch level modeling
Devi Pradeep Podugu20.4K visualizações
Sequential circuitsSequential circuits
Sequential circuits
DrSonali Vyas6.9K visualizações
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
Vinoth Loganathan3.2K visualizações
Mealy and moore machinesMealy and moore machines
Mealy and moore machines
grahamwell5.7K visualizações
Multiplexers and DemultiplexersMultiplexers and Demultiplexers
Multiplexers and Demultiplexers
GargiKhanna1620 visualizações
 multiplexers and demultiplexers multiplexers and demultiplexers
multiplexers and demultiplexers
Unsa Shakir4.3K visualizações
Flip flops, counters & registersFlip flops, counters & registers
Flip flops, counters & registers
Dharit Unadkat2.8K visualizações
VHDL- gate level modellingVHDL- gate level modelling
VHDL- gate level modelling
VandanaPagar1862 visualizações
Verilog lab manual (ECAD and VLSI Lab)Verilog lab manual (ECAD and VLSI Lab)
Verilog lab manual (ECAD and VLSI Lab)
Dr. Swaminathan Kathirvel14.5K visualizações
Modulo n counterModulo n counter
Modulo n counter
Manoj Guha24.3K visualizações
 decoder and encoder decoder and encoder
decoder and encoder
Unsa Shakir2.9K visualizações
Multiplexers & DemultiplexersMultiplexers & Demultiplexers
Multiplexers & Demultiplexers
Jayanshu Gundaniya46.4K visualizações
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
Sudhanshu Janwadkar56.3K visualizações
Sequential Logic CircuitSequential Logic Circuit
Sequential Logic Circuit
Ramasubbu .P27.7K visualizações
PALPAL
PAL
Syed Saeed493 visualizações
8237 dma controller8237 dma controller
8237 dma controller
Tech_MX83.2K visualizações
Verilog HDLVerilog HDL
Verilog HDL
Mantra VLSI44.6K visualizações
Asynchronous sequential circuit analysisAsynchronous sequential circuit analysis
Asynchronous sequential circuit analysis
Dr Naim R Kidwai4.5K visualizações

Similar a Moore and Mealy machines

Lecture 3Lecture 3
Lecture 3MunasarAbdirahman
103 visualizações68 slides
19-MooreMealy.ppt19-MooreMealy.ppt
19-MooreMealy.pptAhsanRahman13
2 visualizações23 slides
melay and moore machine.pptxmelay and moore machine.pptx
melay and moore machine.pptxssuser1b2fab
17 visualizações16 slides
Logic and computer design.pptLogic and computer design.ppt
Logic and computer design.ppteissaalesayi1
43 visualizações30 slides
state_machines1.pdfstate_machines1.pdf
state_machines1.pdfrdjo
22 visualizações29 slides
Ade(unit 4) CountersAde(unit 4) Counters
Ade(unit 4) CountersANKITSURWADE
28 visualizações46 slides

Similar a Moore and Mealy machines(20)

Lecture 3Lecture 3
Lecture 3
MunasarAbdirahman103 visualizações
19-MooreMealy.ppt19-MooreMealy.ppt
19-MooreMealy.ppt
AhsanRahman132 visualizações
melay and moore machine.pptxmelay and moore machine.pptx
melay and moore machine.pptx
ssuser1b2fab17 visualizações
Logic and computer design.pptLogic and computer design.ppt
Logic and computer design.ppt
eissaalesayi143 visualizações
state_machines1.pdfstate_machines1.pdf
state_machines1.pdf
rdjo22 visualizações
Ade(unit 4) CountersAde(unit 4) Counters
Ade(unit 4) Counters
ANKITSURWADE28 visualizações
Mealy Machine by Daniyal KhanMealy Machine by Daniyal Khan
Mealy Machine by Daniyal Khan
Daniyal Khan230 visualizações
Applications of  Mealy  & Moore Machine Applications of  Mealy  & Moore Machine
Applications of Mealy & Moore Machine
SardarKashifKhan18.4K visualizações
 Digital Counter Design Digital Counter Design
Digital Counter Design
GargiKhanna1486 visualizações
Modeling FSMsModeling FSMs
Modeling FSMs
Mohamed Samy3K visualizações
07 seq logicii-ix207 seq logicii-ix2
07 seq logicii-ix2
SHIVA PRASAD120 visualizações
9920Lec12 FSM.ppt9920Lec12 FSM.ppt
9920Lec12 FSM.ppt
SHASHISHARMA8501233 visualizações
mealy moore machine conversion mealy moore machine conversion
mealy moore machine conversion
Chandnigupta803 visualizações
9flipflopsupdated-191016140658.pptx9flipflopsupdated-191016140658.pptx
9flipflopsupdated-191016140658.pptx
udhayaveenaa6 visualizações
Finite State Machine.ppt.pptxFinite State Machine.ppt.pptx
Finite State Machine.ppt.pptx
SKUP1907 visualizações
UNIT-IV.pptxUNIT-IV.pptx
UNIT-IV.pptx
amudhak1045 visualizações
FSM and ASMFSM and ASM
FSM and ASM
Unsa Shakir5.6K visualizações
synchronous state machine designsynchronous state machine design
synchronous state machine design
Adarsh Patel7.9K visualizações

Mais de Irfan Anjum

DLD Lec 8 multiplexers.pptxDLD Lec 8 multiplexers.pptx
DLD Lec 8 multiplexers.pptxIrfan Anjum
4 visualizações20 slides
Lec 04 DLD.pptxLec 04 DLD.pptx
Lec 04 DLD.pptxIrfan Anjum
4 visualizações10 slides
BitCoin Price Predictor.pptxBitCoin Price Predictor.pptx
BitCoin Price Predictor.pptxIrfan Anjum
46 visualizações14 slides
Kalman filter partilce trackingKalman filter partilce tracking
Kalman filter partilce trackingIrfan Anjum
1.1K visualizações16 slides

Mais de Irfan Anjum(7)

DLD Lec 8 multiplexers.pptxDLD Lec 8 multiplexers.pptx
DLD Lec 8 multiplexers.pptx
Irfan Anjum4 visualizações
Lec 04 DLD.pptxLec 04 DLD.pptx
Lec 04 DLD.pptx
Irfan Anjum4 visualizações
Control hazards MIPS pipeline.pptxControl hazards MIPS pipeline.pptx
Control hazards MIPS pipeline.pptx
Irfan Anjum7 visualizações
BitCoin Price Predictor.pptxBitCoin Price Predictor.pptx
BitCoin Price Predictor.pptx
Irfan Anjum46 visualizações
Logical instructions (and, or, xor, not, test)Logical instructions (and, or, xor, not, test)
Logical instructions (and, or, xor, not, test)
Irfan Anjum5.7K visualizações
Kalman filter partilce trackingKalman filter partilce tracking
Kalman filter partilce tracking
Irfan Anjum1.1K visualizações
Report kalman filteringReport kalman filtering
Report kalman filtering
Irfan Anjum1.4K visualizações

Último(20)

Women from Hackney’s History: Stoke Newington by Sue DoeWomen from Hackney’s History: Stoke Newington by Sue Doe
Women from Hackney’s History: Stoke Newington by Sue Doe
History of Stoke Newington103 visualizações
Drama KS5 BreakdownDrama KS5 Breakdown
Drama KS5 Breakdown
WestHatch50 visualizações
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdfCWP_23995_2013_17_11_2023_FINAL_ORDER.pdf
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdf
SukhwinderSingh895865467 visualizações
Sociology KS5Sociology KS5
Sociology KS5
WestHatch50 visualizações
STERILITY TEST.pptxSTERILITY TEST.pptx
STERILITY TEST.pptx
Anupkumar Sharma102 visualizações
STYP infopack.pdfSTYP infopack.pdf
STYP infopack.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego143 visualizações
American Psychological Association  7th Edition.pptxAmerican Psychological Association  7th Edition.pptx
American Psychological Association 7th Edition.pptx
SamiullahAfridi458 visualizações
BYSC infopack.pdfBYSC infopack.pdf
BYSC infopack.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego144 visualizações
Plastic waste.pdfPlastic waste.pdf
Plastic waste.pdf
alqaseedae81 visualizações
Nico Baumbach IMR Media ComponentNico Baumbach IMR Media Component
Nico Baumbach IMR Media Component
InMediaRes1186 visualizações
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and Startups
Svetlin Nakov57 visualizações
Azure DevOps Pipeline setup for Mule APIs #36Azure DevOps Pipeline setup for Mule APIs #36
Azure DevOps Pipeline setup for Mule APIs #36
MysoreMuleSoftMeetup75 visualizações
discussion post.pdfdiscussion post.pdf
discussion post.pdf
jessemercerail70 visualizações
SIMPLE PRESENT TENSE_new.pptxSIMPLE PRESENT TENSE_new.pptx
SIMPLE PRESENT TENSE_new.pptx
nisrinamadani2146 visualizações
Gopal Chakraborty Memorial Quiz 2.0 Prelims.pptxGopal Chakraborty Memorial Quiz 2.0 Prelims.pptx
Gopal Chakraborty Memorial Quiz 2.0 Prelims.pptx
Debapriya Chakraborty221 visualizações

Moore and Mealy machines

  • 2. OUTLINE • Introduction • Types of Finite State Machines • • • Mealy State Machine Moore State Machine Example 2
  • 3. Finite State Machine • FSMs are different from counters in the sense that they have external I/Ps, and state transitions are dependent on these I/Ps and the current state. • Simple forms of pattern matching. • Models for sequential logic circuits, of the kind on which every present-day computer and many device controllers is based. 3
  • 4. Mealy and Moore Machines External I/Ps External I/Ps m1 External O/Ps m1 Comb. Logic n FFs m2 Next State Comb. Logic n even ↓ odd n Output Logic CLK m2 FFs n CLK External Outputs Moore Machine Model Mealy Machine Model 4
  • 5. Difference Between Mealy and Moore Machine Mealy (1) O/Ps depend on the present state and present I/Ps (2) The O/P change asyn -chronously with the enabling clock edge (3) (4) Moore O/Ps depend only on the present state Since the O/Ps change when the state changes, and the state change is synchronous with the enabling clock edge, O/Ps change synchronously with this clock edge A counter is a Moore machine A counter is not a Mealy machine A Mealy machine will have the same # or fewer states than a Moore machine 5
  • 6. Finite State Machine (FSM) Design Example: There is a one bit-serial I/P line. Design an FSM that outputs a ‘0’ if an even # of 1’s have been received on the I/P line and the outputs a ‘1’ otherwise. x FSM O/p y CLK CLK x # of 1s even (0) odd (1) even (2) odd (3) 6 odd (3)
  • 7. Solution 1: (Mealy) Solution 2: (Moore) 0 0/0 Reset Even Transition Arc Input 1/1 1/0 Odd Reset Output Even Output [0] O/P is dependent on current state and input in Mealy 1 1 Odd [1] 0 0/1 Mealy Machine: Output is associated with the state transition, and appears before the state transition is completed (by the next clock pulse). Input Output is dependent only on current state Moore Machine: Output is associated with the state and hence appears after the state transition take place. 7
  • 8. State Transition Table (Even-Parity Checker) Even State: 0 ; Present State Input A Odd State: 1; Next State x State Variable A Mealy O/P Moore O/P A+ y1 D-FF Excit. y2 DA 0 0 0 0 0 0 0 1 1 0 1 1 1 1 0 1x 1 0 Input variables to comb. logic 1 1 DA= A⊕x ; y1 = A for Moore y2 = A⊕x for Mealy Output functions 1 1 y2 0 N.S. & O/P Logic Q A FF x N.S. Logic Or Q DA CLK 8 0 A O/P Logic FFs y1 DA
  • 9. Moore M/C Implementation a) D-FF 0 D x=1 R CLK A Q y1 Q Reset Moore O/P is synchronized with clock. Mealy M/C Implementation y2 0 1 D x=1 CLK Q R A Q Reset a) D-FF Mealy O/P is not synchronized with clock. 9
  • 10. Moore M/C Implementation a) D-FF 0 D x=1 R CLK A Q y1 Q Reset Moore O/P is synchronized with clock. Mealy M/C Implementation y2 0 1 D x=1 CLK Q R A Q Reset a) D-FF Mealy O/P is not synchronized with clock. 9