SlideShare a Scribd company logo
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 moore machine model
Mealy moore machine modelMealy moore machine model
Mealy moore machine model
deepinderbedi
 
1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets
Sampath Kumar S
 
Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer Architecture
InteX Research Lab
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
Mathivanan Natarajan
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
Shuaib Hotak
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)
Zubair Khalid
 
Finite State Machine.ppt.pptx
Finite State Machine.ppt.pptxFinite State Machine.ppt.pptx
Finite State Machine.ppt.pptx
SKUP1
 
Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machines
AYESHA JAVED
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
Abhilash Nair
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazard
AJAL A J
 
Mealy and moore machine
Mealy and moore machineMealy and moore machine
Mealy and moore machine
Ehatsham Riaz
 
flag register of 8086
flag register of 8086flag register of 8086
flag register of 8086
asrithak
 
bus and memory tranfer (computer organaization)
bus and memory tranfer (computer organaization)bus and memory tranfer (computer organaization)
bus and memory tranfer (computer organaization)
Siddhi Viradiya
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
pradeepa velmurugan
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
CS_GDRCST
 
Digital electronics logic families
Digital electronics logic familiesDigital electronics logic families
Digital electronics logic families
BLESSINAR0
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & ReasoningSajid Marwat
 
Counters & time delay
Counters & time delayCounters & time delay
Counters & time delay
Hemant Chetwani
 
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
Shubham Singh
 
Computer organisation -morris mano
Computer organisation  -morris manoComputer organisation  -morris mano
Computer organisation -morris mano
vishnu murthy
 

What's hot (20)

Mealy moore machine model
Mealy moore machine modelMealy moore machine model
Mealy moore machine model
 
1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets
 
Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer Architecture
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)
 
Finite State Machine.ppt.pptx
Finite State Machine.ppt.pptxFinite State Machine.ppt.pptx
Finite State Machine.ppt.pptx
 
Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machines
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazard
 
Mealy and moore machine
Mealy and moore machineMealy and moore machine
Mealy and moore machine
 
flag register of 8086
flag register of 8086flag register of 8086
flag register of 8086
 
bus and memory tranfer (computer organaization)
bus and memory tranfer (computer organaization)bus and memory tranfer (computer organaization)
bus and memory tranfer (computer organaization)
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
 
Digital electronics logic families
Digital electronics logic familiesDigital electronics logic families
Digital electronics logic families
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & Reasoning
 
Counters & time delay
Counters & time delayCounters & time delay
Counters & time delay
 
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
 
Computer organisation -morris mano
Computer organisation  -morris manoComputer organisation  -morris mano
Computer organisation -morris mano
 

Similar to Applications of Mealy & Moore Machine

Finite state automaton
Finite state automatonFinite state automaton
Finite state automaton
AmmAr mobark
 
MOC2.PPT[1].pptx introduction to mealy machine and moore machine with eample ...
MOC2.PPT[1].pptx introduction to mealy machine and moore machine with eample ...MOC2.PPT[1].pptx introduction to mealy machine and moore machine with eample ...
MOC2.PPT[1].pptx introduction to mealy machine and moore machine with eample ...
PranavHendre1
 
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 machines
grahamwell
 
Mealy Machine by Daniyal Khan
Mealy Machine by Daniyal KhanMealy Machine by Daniyal Khan
Mealy Machine by Daniyal Khan
Daniyal Khan
 
Moorey to mealy conversion
Moorey to mealy conversionMoorey to mealy conversion
Moorey to mealy conversion
Dr. ABHISHEK K PANDEY
 
Unit 3 Manufacturing Systems in automation
Unit 3 Manufacturing Systems in automationUnit 3 Manufacturing Systems in automation
Unit 3 Manufacturing Systems in automation
rahulkatre9
 
melay and moore machine.pptx
melay and moore machine.pptxmelay and moore machine.pptx
melay and moore machine.pptx
ssuser1b2fab
 
state_machines1.pdf
state_machines1.pdfstate_machines1.pdf
state_machines1.pdf
rdjo
 
State Machines and PLC Programming.pptx
State Machines and PLC Programming.pptxState Machines and PLC Programming.pptx
State Machines and PLC Programming.pptx
Tobey Houston
 
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
RidyaGupta1
 
FSM and ASM
FSM and ASMFSM and ASM
FSM and ASM
Unsa Shakir
 
Automation and robotics
Automation and roboticsAutomation and robotics
Automation and robotics
Balaji Krishnan
 
Digital Design Session 24
Digital Design Session 24Digital 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
LeahRachael
 
Robotics and Automation_Case Studies
Robotics and Automation_Case StudiesRobotics and Automation_Case Studies
Robotics and Automation_Case Studies
JAIGANESH SEKAR
 

Similar to Applications of Mealy & Moore Machine (20)

Finite state automaton
Finite state automatonFinite state automaton
Finite state automaton
 
MOC2.PPT[1].pptx introduction to mealy machine and moore machine with eample ...
MOC2.PPT[1].pptx introduction to mealy machine and moore machine with eample ...MOC2.PPT[1].pptx introduction to mealy machine and moore machine with eample ...
MOC2.PPT[1].pptx introduction to mealy machine and moore machine with eample ...
 
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
 
State Machines and PLC Programming.pptx
State Machines and PLC Programming.pptxState Machines and PLC Programming.pptx
State Machines and PLC Programming.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
 
Robotics and Automation_Case Studies
Robotics and Automation_Case StudiesRobotics and Automation_Case Studies
Robotics and Automation_Case Studies
 

Recently uploaded

The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 

Recently uploaded (20)

The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 

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).