Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

UNIVERSITY INSTITUTE OF TECHNOLOGY

COMPUTER SCIENCE & ENGINEERING


Bachelor of Engineering (Computer Science & Engineering)-CSBS
FORMAL LANGUAGE AND AUTOMATA THEORY
CST-390
Dr. Binayak Dutta(E12952)

FSA WITH OUTPUT DISCOVER . LEARN . EMPOWER


FSA WITH
OUTPUT
Course Outcome
CO Title Level
Number

CO1 Students will be able to understand the powers Understand


and limitations of the language.  
CO2 Students will be able to learn the concepts of Create
unsolvable problems  
CO3 Students will be able to demonstrate and apply the Apply
relationship between various formal languages and
learn the characteristics properties of the
languages

2
Contents Outline
• FSA with output
• Mealy machine
• Moore machines

3
Moore and Mealy Machine
• Combinational logic computes next state and outputs
• Next state is a function of current state and inputs
• Outputs are functions of
• Current state (Moore machine)
• Current state and inputs (Mealy machine)
State Diagrams
• Moore machine
• Each state is labeled by a pair:
state-name/output or state-name [output]
• Mealy machine
• Each transition arc is labeled by a pair:
input-condition/output
Example “01 or 10” detector: a Moore
machine
Example “01 or 10” detector: a Mealy
machine
Comparing Moore and Mealy machines
• Moore machines
+ Safer to use because outputs change at clock edge
– May take additional logic to decode state into outputs
• Mealy machines
+ Typically have fewer states
+ React faster to inputs — don't wait for clock
– Asynchronous outputs can be dangerous
• We often design synchronous Mealy machines
• Design a Mealy machine
• Then register the outputs
Conversion from Mealy machine to Moore
machine
Steps:
1.> Determine the number of different output associated with qi in the
next state column.
2.> we split qi into different states according to different output
associated with it. for ex. suppose in the next state column of the
above sample transition table of mealy machine, the output
associated with q1 is "0" in the first next state column and "1" in the
second next state column. so we split q1 into q10 and q11 states.
similarly check others and split them.
Mealy to Moore conversion
Moore to Mealy conversion
References
• Hopcroft J.E. and Ullman J.D., “Introduction to Automata Theory Languages and Computation”, Narosa Publications.
• https://en.wikipedia.org
• http://www.eecs.wsu.edu/

12
THANK YOU

For queries
Email: sheetal.ait@cumail.in

13

You might also like