SlideShare a Scribd company logo
1 of 10
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

More Related Content

What's hot

sequential circuits
sequential circuitssequential circuits
sequential circuitsUnsa Shakir
 
multiplexers and demultiplexers
 multiplexers and demultiplexers multiplexers and demultiplexers
multiplexers and demultiplexersUnsa Shakir
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuitsSARITHA REDDY
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits DrSonali Vyas
 
Mealy and moore machines
Mealy and moore machinesMealy and moore machines
Mealy and moore machinesgrahamwell
 
Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machinesAYESHA JAVED
 
mealy and moore machines
mealy and moore machinesmealy and moore machines
mealy and moore machinesUnsa Shakir
 
Race around and master slave flip flop
Race around and master slave flip flopRace around and master slave flip flop
Race around and master slave flip flopShubham Singh
 
Mealy state machine
Mealy state machineMealy state machine
Mealy state machineArif Siyal
 
Mealy moore machine model
Mealy moore machine modelMealy moore machine model
Mealy moore machine modeldeepinderbedi
 
SHIFT REGISTERS
SHIFT REGISTERSSHIFT REGISTERS
SHIFT REGISTERSkumari36
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsVinoth Loganathan
 
Sequential logic circuits flip-flop pt 1
Sequential logic circuits   flip-flop pt 1Sequential logic circuits   flip-flop pt 1
Sequential logic circuits flip-flop pt 1Sarah Sue Calbio
 

What's hot (20)

sequential circuits
sequential circuitssequential circuits
sequential circuits
 
multiplexers and demultiplexers
 multiplexers and demultiplexers multiplexers and demultiplexers
multiplexers and demultiplexers
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
 
Mealy and moore machines
Mealy and moore machinesMealy and moore machines
Mealy and moore machines
 
Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machines
 
Multiplexers & Demultiplexers
Multiplexers & DemultiplexersMultiplexers & Demultiplexers
Multiplexers & Demultiplexers
 
mealy and moore machines
mealy and moore machinesmealy and moore machines
mealy and moore machines
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
Race around and master slave flip flop
Race around and master slave flip flopRace around and master slave flip flop
Race around and master slave flip flop
 
Mealy state machine
Mealy state machineMealy state machine
Mealy state machine
 
Mealy moore machine model
Mealy moore machine modelMealy moore machine model
Mealy moore machine model
 
Counters
CountersCounters
Counters
 
SHIFT REGISTERS
SHIFT REGISTERSSHIFT REGISTERS
SHIFT REGISTERS
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
 
MULTIPLEXER
MULTIPLEXERMULTIPLEXER
MULTIPLEXER
 
Sequential logic circuits flip-flop pt 1
Sequential logic circuits   flip-flop pt 1Sequential logic circuits   flip-flop pt 1
Sequential logic circuits flip-flop pt 1
 
latches
 latches latches
latches
 
Shift Register
Shift RegisterShift Register
Shift Register
 

Similar to Moore and Mealy machines

Introduction state machine
Introduction state machineIntroduction state machine
Introduction state machineShreyans Pathak
 
melay and moore machine.pptx
melay and moore machine.pptxmelay and moore machine.pptx
melay and moore machine.pptxssuser1b2fab
 
Finite state automaton
Finite state automatonFinite state automaton
Finite state automatonAmmAr mobark
 
Logic and computer design.ppt
Logic and computer design.pptLogic and computer design.ppt
Logic and computer design.ppteissaalesayi1
 
state_machines1.pdf
state_machines1.pdfstate_machines1.pdf
state_machines1.pdfrdjo
 
Ade(unit 4) Counters
Ade(unit 4) CountersAde(unit 4) Counters
Ade(unit 4) CountersANKITSURWADE
 
Mealy Machine by Daniyal Khan
Mealy Machine by Daniyal KhanMealy Machine by Daniyal Khan
Mealy Machine by Daniyal KhanDaniyal Khan
 
Applications of Mealy & Moore Machine
Applications of  Mealy  & Moore Machine Applications of  Mealy  & Moore Machine
Applications of Mealy & Moore Machine SardarKashifKhan
 
Digital Counter Design
 Digital Counter Design Digital Counter Design
Digital Counter DesignGargiKhanna1
 
07 seq logicii-ix2
07 seq logicii-ix207 seq logicii-ix2
07 seq logicii-ix2SHIVA PRASAD
 
Synchronous state machines. Moore and Mealy state machines (FSM)
Synchronous state machines.  Moore and Mealy state machines (FSM)Synchronous state machines.  Moore and Mealy state machines (FSM)
Synchronous state machines. Moore and Mealy state machines (FSM)Mumbi Chishimba
 
mealy moore machine conversion
mealy moore machine conversion mealy moore machine conversion
mealy moore machine conversion Chandnigupta80
 
9flipflopsupdated-191016140658.pptx
9flipflopsupdated-191016140658.pptx9flipflopsupdated-191016140658.pptx
9flipflopsupdated-191016140658.pptxudhayaveenaa
 
Finite State Machine.ppt.pptx
Finite State Machine.ppt.pptxFinite State Machine.ppt.pptx
Finite State Machine.ppt.pptxSKUP1
 
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdf
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdfPreparatory_questions_final_exam_DigitalElectronics1 (1).pdf
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdfrdjo
 
UNIT-IV.pptx
UNIT-IV.pptxUNIT-IV.pptx
UNIT-IV.pptxamudhak10
 

Similar to Moore and Mealy machines (20)

Introduction state machine
Introduction state machineIntroduction state machine
Introduction state machine
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
19-MooreMealy.ppt
19-MooreMealy.ppt19-MooreMealy.ppt
19-MooreMealy.ppt
 
melay and moore machine.pptx
melay and moore machine.pptxmelay and moore machine.pptx
melay and moore machine.pptx
 
Finite state automaton
Finite state automatonFinite state automaton
Finite state automaton
 
Logic and computer design.ppt
Logic and computer design.pptLogic and computer design.ppt
Logic and computer design.ppt
 
state_machines1.pdf
state_machines1.pdfstate_machines1.pdf
state_machines1.pdf
 
Ade(unit 4) Counters
Ade(unit 4) CountersAde(unit 4) Counters
Ade(unit 4) Counters
 
Mealy Machine by Daniyal Khan
Mealy Machine by Daniyal KhanMealy Machine by Daniyal Khan
Mealy Machine by Daniyal Khan
 
Applications of Mealy & Moore Machine
Applications of  Mealy  & Moore Machine Applications of  Mealy  & Moore Machine
Applications of Mealy & Moore Machine
 
Digital Counter Design
 Digital Counter Design Digital Counter Design
Digital Counter Design
 
Modeling FSMs
Modeling FSMsModeling FSMs
Modeling FSMs
 
07 seq logicii-ix2
07 seq logicii-ix207 seq logicii-ix2
07 seq logicii-ix2
 
Synchronous state machines. Moore and Mealy state machines (FSM)
Synchronous state machines.  Moore and Mealy state machines (FSM)Synchronous state machines.  Moore and Mealy state machines (FSM)
Synchronous state machines. Moore and Mealy state machines (FSM)
 
9920Lec12 FSM.ppt
9920Lec12 FSM.ppt9920Lec12 FSM.ppt
9920Lec12 FSM.ppt
 
mealy moore machine conversion
mealy moore machine conversion mealy moore machine conversion
mealy moore machine conversion
 
9flipflopsupdated-191016140658.pptx
9flipflopsupdated-191016140658.pptx9flipflopsupdated-191016140658.pptx
9flipflopsupdated-191016140658.pptx
 
Finite State Machine.ppt.pptx
Finite State Machine.ppt.pptxFinite State Machine.ppt.pptx
Finite State Machine.ppt.pptx
 
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdf
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdfPreparatory_questions_final_exam_DigitalElectronics1 (1).pdf
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdf
 
UNIT-IV.pptx
UNIT-IV.pptxUNIT-IV.pptx
UNIT-IV.pptx
 

More from Irfan Anjum

DLD Lec 8 multiplexers.pptx
DLD Lec 8 multiplexers.pptxDLD Lec 8 multiplexers.pptx
DLD Lec 8 multiplexers.pptxIrfan Anjum
 
Control hazards MIPS pipeline.pptx
Control hazards MIPS pipeline.pptxControl hazards MIPS pipeline.pptx
Control hazards MIPS pipeline.pptxIrfan Anjum
 
BitCoin Price Predictor.pptx
BitCoin Price Predictor.pptxBitCoin Price Predictor.pptx
BitCoin Price Predictor.pptxIrfan Anjum
 
Logical instructions (and, or, xor, not, test)
Logical instructions (and, or, xor, not, test)Logical instructions (and, or, xor, not, test)
Logical instructions (and, or, xor, not, test)Irfan Anjum
 
Kalman filter partilce tracking
Kalman filter partilce trackingKalman filter partilce tracking
Kalman filter partilce trackingIrfan Anjum
 
Report kalman filtering
Report kalman filteringReport kalman filtering
Report kalman filteringIrfan Anjum
 

More from Irfan Anjum (7)

DLD Lec 8 multiplexers.pptx
DLD Lec 8 multiplexers.pptxDLD Lec 8 multiplexers.pptx
DLD Lec 8 multiplexers.pptx
 
Lec 04 DLD.pptx
Lec 04 DLD.pptxLec 04 DLD.pptx
Lec 04 DLD.pptx
 
Control hazards MIPS pipeline.pptx
Control hazards MIPS pipeline.pptxControl hazards MIPS pipeline.pptx
Control hazards MIPS pipeline.pptx
 
BitCoin Price Predictor.pptx
BitCoin Price Predictor.pptxBitCoin Price Predictor.pptx
BitCoin Price Predictor.pptx
 
Logical instructions (and, or, xor, not, test)
Logical instructions (and, or, xor, not, test)Logical instructions (and, or, xor, not, test)
Logical instructions (and, or, xor, not, test)
 
Kalman filter partilce tracking
Kalman filter partilce trackingKalman filter partilce tracking
Kalman filter partilce tracking
 
Report kalman filtering
Report kalman filteringReport kalman filtering
Report kalman filtering
 

Recently uploaded

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 

Recently uploaded (20)

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 

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