Download - Mealy and moore machines
![Page 1: Mealy and moore machines](https://reader036.vdocuments.us/reader036/viewer/2022082420/547dd43ab47959a7508b4a42/html5/thumbnails/1.jpg)
Finite State Revisited
A model of computation
![Page 2: Mealy and moore machines](https://reader036.vdocuments.us/reader036/viewer/2022082420/547dd43ab47959a7508b4a42/html5/thumbnails/2.jpg)
What can a computer do?• Models of computation strip specific
approaches down to a logical core– Computable– Not Computable
• Finite state machines are a simplified, idealised model of a computing machine.
• Add permanent storage and you have a Turing machine, the simplest general computer
![Page 3: Mealy and moore machines](https://reader036.vdocuments.us/reader036/viewer/2022082420/547dd43ab47959a7508b4a42/html5/thumbnails/3.jpg)
Three types of FSM
• Without output (answer true or false)1.Finite State Automata• With output2.Mealy machine (output on transition)3.Moore machine (output on state)
![Page 4: Mealy and moore machines](https://reader036.vdocuments.us/reader036/viewer/2022082420/547dd43ab47959a7508b4a42/html5/thumbnails/4.jpg)
Software
![Page 5: Mealy and moore machines](https://reader036.vdocuments.us/reader036/viewer/2022082420/547dd43ab47959a7508b4a42/html5/thumbnails/5.jpg)
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
![Page 6: Mealy and moore machines](https://reader036.vdocuments.us/reader036/viewer/2022082420/547dd43ab47959a7508b4a42/html5/thumbnails/6.jpg)
Challenge 1
• Mealy machine that inverts the input.• ie: if given 01101 outputs 10010
![Page 7: Mealy and moore machines](https://reader036.vdocuments.us/reader036/viewer/2022082420/547dd43ab47959a7508b4a42/html5/thumbnails/7.jpg)
Challenge 2
• Mealy machine that divides by 2• Ie: if given 0101 will give 0010
![Page 8: Mealy and moore machines](https://reader036.vdocuments.us/reader036/viewer/2022082420/547dd43ab47959a7508b4a42/html5/thumbnails/8.jpg)
Challenge 3
• A Moore machine that inverts the input
![Page 9: Mealy and moore machines](https://reader036.vdocuments.us/reader036/viewer/2022082420/547dd43ab47959a7508b4a42/html5/thumbnails/9.jpg)
Challenge 4
• Mealy Vending Machine• 5p, 10p, 20p – vends sweets at 15p –
gives change.
![Page 10: Mealy and moore machines](https://reader036.vdocuments.us/reader036/viewer/2022082420/547dd43ab47959a7508b4a42/html5/thumbnails/10.jpg)
Challenge 5
• Moore machine to divide a binary number by 2