Mealy and moore machines

3,703 views

Published on

Exercises for the Finite State Machine unit

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,703
On SlideShare
0
From Embeds
0
Number of Embeds
21
Actions
Shares
0
Downloads
91
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Mealy and moore machines

  1. 1. Finite State Revisited A model of computation
  2. 2. 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
  3. 3. 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)
  4. 4. Software
  5. 5. 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
  6. 6. Challenge 1• Mealy machine that inverts the input.• ie: if given 01101 outputs 10010
  7. 7. Challenge 2• Mealy machine that divides by 2• Ie: if given 0101 will give 0010
  8. 8. Challenge 3• A Moore machine that inverts the input
  9. 9. Challenge 4• Mealy Vending Machine• 5p, 10p, 20p – vends sweets at 15p – gives change.
  10. 10. Challenge 5• Moore machine to divide a binary number by 2

×