Mealy and moore machines

grahamwell 5,844 views 10 slides Jan 08, 2013
Slide 1
Slide 1 of 10
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10

About This Presentation

Exercises for the Finite State Machine unit


Slide Content

Finite State Revisited
A model of computation

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

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

Software

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

Challenge 1
•Mealy machine that inverts the input.
•ie: if given 01101 outputs 10010

Challenge 2
•Mealy machine that divides by 2
•Ie: if given 0101 will give 0010

Challenge 3
•A Moore machine that inverts the input

Challenge 4
•Mealy Vending Machine
•5p, 10p, 20p – vends sweets at 15p –
gives change.

Challenge 5
•Moore machine to divide a binary
number by 2