SlideShare a Scribd company logo
1 of 11
Applications of Mealy & Moore Machine
Submitted To:
•Ma’m Iqra Yaqoob
Submitted By:
•Muhammad Kashif 25
Bachelor in computer Science
BSCS (Morning) 4 Years
Session: 2016-2020
What is (Finite State Machine)FSM?
A finite state machine is a
machine that has many states and has a logical way of
changing from one state to the other under guiding rules.
Types of FSM Without output (answer true or false)
1. Finite State Automata - With output
2. Mealy machine - output on transition
3. Moore machine - output on state
Mealy Machine
A Mealy Machine
is an FSM whose output depends on the present state as
well as the present input. In Mealy machine every
transition for a particular input symbol has a fixed output.
Mealy Machine(Cont.)
• It can be described by a 6 tuple (Q, ∑, O, δ, X, q0) where −
1. Q is a finite set of states.
2. ∑ is a finite set of symbols called the input alphabet.
3. O is a finite set of symbols called the output alphabet.
4. δ is the input transition function where δ: Q × ∑ → Q
5. X is the output transition function where X: Q → O
6. q0 is the initial state from where any input is processed (q0 ∈ Q).
Moore Machine:
• In Moore machine. the value of output function is depend on the
present state only. Moore machine is described by 6-tuples - (Q, Σ, Δ, δ, λ, q0) where
1. Q = Finite non-empty set of states;
2. Σ = Set of input alphabets.
3. Δ = Set of output alphabets.
4. δ = Transition function mapping Q X Σ → Q
5. λ = Output function mapping Q → Δ
6. q0 = Initial state..
Advantages of Mealy and Moore state Machines
• Moore machines are cheap
• They are easy to use
• Moore state machines are very fast
• Mealy machines are reactive i.e. they have a low response time (they are
fast)
Disadvantages of Mealy and Moore state Machines •
Mealy state machines are expensive to produce
• Number of states can become unmanageable (they become too many)
Uses of Mealy and Moore state Machines
• Mealy state machines are used in processors due to their property of having many states
• Mealy state machines are also used to provide a rudimentary mathematical model for
cipher machines
• A Moore state machine is used as a right enable in SRAM because of its speed.
• It is used in SRAM because SRAM needs a level-sensitive control (signal has to be
asserted for an amount of time)
Mealy and Moore• Both have:
– No final state
– Produce output from an input string
– No non-determinism
• Mealy machines produce output on transition
• Moore machines produce output on state
Comparisson between melay ans moore machine
• the Mealy state machine’s state is changed by the inputs and the state of the machine
but The Moore state machine’s state is affected by the state of the machine only
• Moore machines are slower than the Mealy machines
• Moore machines are easier to compose than Mealy machines .
• The Moore state machine takes at least one clock cycle to change the state of the
machine while the Mealy state machine is guaranteed to use more than one clock
cycle.
• Moore machines are cheap.
• They are easy to use.
• Moore state machines are very fast.
• Mealy machines are reactive i.e. they have a low response time (they are fast)
Comparison of Mealy and Moore FSM
• Mealy machines have less states – outputs are on transitions (n2) rather than
states (n)
• Moore machines are safer to use – outputs change at clock edge (always one
cycle later) – in Mealy machines, input change can cause output change as soon
as logic is done – a big problem when two machines are interconnected –
asynchronous feedback may occur if one isn’t careful
• Mealy machines react faster to inputs – react in same cycle – don't need to
wait for clock – outputs may be considerably shorter than the clock cycle – in
Moore machines, more logic may be necessary to decode state into outputs –
there may be more gate delays after clock edge
Examples of mealy and morre machine
1.) Like take the example of implementation of Elevator functionality using a state
diagram.
2.) Each time you do a search (particularly a "pattern search") in your favorite
editor/tool, the pattern is translated into some form of finite state machine, which
does the matching.
3.) The lexical analysis part of your compiler/interpreter (yes, even your shell) is
again a finite automaton which matches keywords and other tokens recognized by the
language.
4.) Any vending machine is a finite automaton which takes in coins of different
denominations and recognizes when the correct amount has been entered (OK,
today's vending machines probably have a small CPU inside doing the adding, but the
end result is the same).

More Related Content

What's hot

Mealy state machine
Mealy state machineMealy state machine
Mealy state machineArif Siyal
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite AutomataRatnakar Mikkili
 
Timing and control
Timing and controlTiming and control
Timing and controlchauhankapil
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite AutomataArchana Gopinath
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptarunsingh660
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit DesignVinit Raut
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing ThesisHemant Sharma
 
Real Time Kernels
Real Time KernelsReal Time Kernels
Real Time KernelsArnav Soni
 
Finite state machines
Finite state machinesFinite state machines
Finite state machinesdennis gookyi
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDAPush Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDAAshish Duggal
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agentsMegha Sharma
 
Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInteX Research Lab
 
Finite automata-for-lexical-analysis
Finite automata-for-lexical-analysisFinite automata-for-lexical-analysis
Finite automata-for-lexical-analysisDattatray Gandhmal
 

What's hot (20)

Mealy state machine
Mealy state machineMealy state machine
Mealy state machine
 
Np cooks theorem
Np cooks theoremNp cooks theorem
Np cooks theorem
 
First and follow set
First and follow setFirst and follow set
First and follow set
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite Automata
 
Timing and control
Timing and controlTiming and control
Timing and control
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite Automata
 
Unit 4-booth algorithm
Unit 4-booth algorithmUnit 4-booth algorithm
Unit 4-booth algorithm
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.ppt
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
 
K - Map
  K - Map    K - Map
K - Map
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing Thesis
 
Real Time Kernels
Real Time KernelsReal Time Kernels
Real Time Kernels
 
pushdown automata
pushdown automatapushdown automata
pushdown automata
 
Finite state machines
Finite state machinesFinite state machines
Finite state machines
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDAPush Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer Architecture
 
NFA & DFA
NFA & DFANFA & DFA
NFA & DFA
 
Finite automata-for-lexical-analysis
Finite automata-for-lexical-analysisFinite automata-for-lexical-analysis
Finite automata-for-lexical-analysis
 

Similar to Applications of Mealy & Moore Machine

Finite state automaton
Finite state automatonFinite state automaton
Finite state automatonAmmAr mobark
 
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
 
Seminar Presentation on FSM based vending machine
Seminar Presentation on FSM based vending machine Seminar Presentation on FSM based vending machine
Seminar Presentation on FSM based vending machine Pratik Patil
 
Mealy and moore machines
Mealy and moore machinesMealy and moore machines
Mealy and moore machinesgrahamwell
 
Mealy Machine by Daniyal Khan
Mealy Machine by Daniyal KhanMealy Machine by Daniyal Khan
Mealy Machine by Daniyal KhanDaniyal Khan
 
Unit 3 Manufacturing Systems in automation
Unit 3 Manufacturing Systems in automationUnit 3 Manufacturing Systems in automation
Unit 3 Manufacturing Systems in automationrahulkatre9
 
melay and moore machine.pptx
melay and moore machine.pptxmelay and moore machine.pptx
melay and moore machine.pptxssuser1b2fab
 
state_machines1.pdf
state_machines1.pdfstate_machines1.pdf
state_machines1.pdfrdjo
 
Moore and Mealy machines
Moore and Mealy machinesMoore and Mealy machines
Moore and Mealy machinesIrfan Anjum
 
State Machines and PLC Programming.pptx
State Machines and PLC Programming.pptxState Machines and PLC Programming.pptx
State Machines and PLC Programming.pptxTobey Houston
 
Finite State Machine.ppt.pptx
Finite State Machine.ppt.pptxFinite State Machine.ppt.pptx
Finite State Machine.ppt.pptxSKUP1
 
20. Saima Ansari-mealy-moore-machine.pptx
20. Saima Ansari-mealy-moore-machine.pptx20. Saima Ansari-mealy-moore-machine.pptx
20. Saima Ansari-mealy-moore-machine.pptxRidyaGupta1
 
Unit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programmingUnit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programmingLeahRachael
 

Similar to Applications of Mealy & Moore Machine (20)

Finite state automaton
Finite state automatonFinite state automaton
Finite state automaton
 
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)
 
Mgd finite statemachine
Mgd finite statemachineMgd finite statemachine
Mgd finite statemachine
 
Seminar Presentation on FSM based vending machine
Seminar Presentation on FSM based vending machine Seminar Presentation on FSM based vending machine
Seminar Presentation on FSM based vending machine
 
Mealy and moore machines
Mealy and moore machinesMealy and moore machines
Mealy and moore machines
 
Mealy Machine by Daniyal Khan
Mealy Machine by Daniyal KhanMealy Machine by Daniyal Khan
Mealy Machine by Daniyal Khan
 
Moorey to mealy conversion
Moorey to mealy conversionMoorey to mealy conversion
Moorey to mealy conversion
 
Unit 3 Manufacturing Systems in automation
Unit 3 Manufacturing Systems in automationUnit 3 Manufacturing Systems in automation
Unit 3 Manufacturing Systems in automation
 
melay and moore machine.pptx
melay and moore machine.pptxmelay and moore machine.pptx
melay and moore machine.pptx
 
state_machines1.pdf
state_machines1.pdfstate_machines1.pdf
state_machines1.pdf
 
Moore and Mealy machines
Moore and Mealy machinesMoore and Mealy machines
Moore and Mealy machines
 
State Machines and PLC Programming.pptx
State Machines and PLC Programming.pptxState Machines and PLC Programming.pptx
State Machines and PLC Programming.pptx
 
Finite State Machine.ppt.pptx
Finite State Machine.ppt.pptxFinite State Machine.ppt.pptx
Finite State Machine.ppt.pptx
 
20. Saima Ansari-mealy-moore-machine.pptx
20. Saima Ansari-mealy-moore-machine.pptx20. Saima Ansari-mealy-moore-machine.pptx
20. Saima Ansari-mealy-moore-machine.pptx
 
Dss6 7
Dss6 7Dss6 7
Dss6 7
 
FSM and ASM
FSM and ASMFSM and ASM
FSM and ASM
 
Automation and robotics
Automation and roboticsAutomation and robotics
Automation and robotics
 
Automation.pptx
Automation.pptxAutomation.pptx
Automation.pptx
 
Digital Design Session 24
Digital Design Session 24Digital Design Session 24
Digital Design Session 24
 
Unit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programmingUnit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programming
 

Recently uploaded

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 

Recently uploaded (20)

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 

Applications of Mealy & Moore Machine

  • 1. Applications of Mealy & Moore Machine Submitted To: •Ma’m Iqra Yaqoob Submitted By: •Muhammad Kashif 25 Bachelor in computer Science BSCS (Morning) 4 Years Session: 2016-2020
  • 2. What is (Finite State Machine)FSM? A finite state machine is a machine that has many states and has a logical way of changing from one state to the other under guiding rules. Types of FSM Without output (answer true or false) 1. Finite State Automata - With output 2. Mealy machine - output on transition 3. Moore machine - output on state
  • 3. Mealy Machine A Mealy Machine is an FSM whose output depends on the present state as well as the present input. In Mealy machine every transition for a particular input symbol has a fixed output.
  • 4. Mealy Machine(Cont.) • It can be described by a 6 tuple (Q, ∑, O, δ, X, q0) where − 1. Q is a finite set of states. 2. ∑ is a finite set of symbols called the input alphabet. 3. O is a finite set of symbols called the output alphabet. 4. δ is the input transition function where δ: Q × ∑ → Q 5. X is the output transition function where X: Q → O 6. q0 is the initial state from where any input is processed (q0 ∈ Q).
  • 5. Moore Machine: • In Moore machine. the value of output function is depend on the present state only. Moore machine is described by 6-tuples - (Q, Σ, Δ, δ, λ, q0) where 1. Q = Finite non-empty set of states; 2. Σ = Set of input alphabets. 3. Δ = Set of output alphabets. 4. δ = Transition function mapping Q X Σ → Q 5. λ = Output function mapping Q → Δ 6. q0 = Initial state..
  • 6. Advantages of Mealy and Moore state Machines • Moore machines are cheap • They are easy to use • Moore state machines are very fast • Mealy machines are reactive i.e. they have a low response time (they are fast) Disadvantages of Mealy and Moore state Machines • Mealy state machines are expensive to produce • Number of states can become unmanageable (they become too many)
  • 7. Uses of Mealy and Moore state Machines • Mealy state machines are used in processors due to their property of having many states • Mealy state machines are also used to provide a rudimentary mathematical model for cipher machines • A Moore state machine is used as a right enable in SRAM because of its speed. • It is used in SRAM because SRAM needs a level-sensitive control (signal has to be asserted for an amount of time)
  • 8. Mealy and Moore• Both have: – No final state – Produce output from an input string – No non-determinism • Mealy machines produce output on transition • Moore machines produce output on state
  • 9. Comparisson between melay ans moore machine • the Mealy state machine’s state is changed by the inputs and the state of the machine but The Moore state machine’s state is affected by the state of the machine only • Moore machines are slower than the Mealy machines • Moore machines are easier to compose than Mealy machines . • The Moore state machine takes at least one clock cycle to change the state of the machine while the Mealy state machine is guaranteed to use more than one clock cycle. • Moore machines are cheap. • They are easy to use. • Moore state machines are very fast. • Mealy machines are reactive i.e. they have a low response time (they are fast)
  • 10. Comparison of Mealy and Moore FSM • Mealy machines have less states – outputs are on transitions (n2) rather than states (n) • Moore machines are safer to use – outputs change at clock edge (always one cycle later) – in Mealy machines, input change can cause output change as soon as logic is done – a big problem when two machines are interconnected – asynchronous feedback may occur if one isn’t careful • Mealy machines react faster to inputs – react in same cycle – don't need to wait for clock – outputs may be considerably shorter than the clock cycle – in Moore machines, more logic may be necessary to decode state into outputs – there may be more gate delays after clock edge
  • 11. Examples of mealy and morre machine 1.) Like take the example of implementation of Elevator functionality using a state diagram. 2.) Each time you do a search (particularly a "pattern search") in your favorite editor/tool, the pattern is translated into some form of finite state machine, which does the matching. 3.) The lexical analysis part of your compiler/interpreter (yes, even your shell) is again a finite automaton which matches keywords and other tokens recognized by the language. 4.) Any vending machine is a finite automaton which takes in coins of different denominations and recognizes when the correct amount has been entered (OK, today's vending machines probably have a small CPU inside doing the adding, but the end result is the same).