Finite Automata (FA) with Output FA discussed so far, is just associated with R.Es or language. Is there exist an FA which generates an output string corresponding.

Slides:



Advertisements
Similar presentations
Introduction to Sequential Circuits
Advertisements

Lecture 9,10 Theory of AUTOMATA
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
التصميم المنطقي Second Course
COE 202: Digital Logic Design Sequential Circuits Part 1 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
Software Engineering, COMP 201 Slide 1 Automata and Formal Languages Moore and Mealy Automata Ralf Möller Hamburg Univ. of Technology based on slides by.
Finite Automata with Output
Lecture # 14 Theory Of Automata By Dr. MM Alam 1.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
11/16/2004EE 42 fall 2004 lecture 331 Lecture #33: Some example circuits Last lecture: –Edge triggers –Registers This lecture: –Example circuits –shift.
Logic and Computer Design Fundamentals Registers and Counters
CSC 361Finite Automata1. CSC 361Finite Automata2 Formal Specification of Languages Generators Grammars Context-free Regular Regular Expressions Recognizers.
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Building Functions.
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
Rabie A. Ramadan Lecture 3
State Machines.
Unit 14 Derivation of State Graphs
CSC312 Automata Theory Lecture # 19 Chapter # 8 by Cohen Finite Automata with Output.
Lecture 1 Computation and Languages CS311 Fall 2012.
Moore machine and Mealy machine (P.274)
CPEN Digital System Design Chapter 5 - Sequential Circuits Sequential Circuit Design C. Gerousis © Logic and Computer Design Fundamentals, 4 rd Ed.,
Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers.
Lecture # 15 Theory Of Automata By Dr. MM Alam 1.
Introduction to State Machine
Review of Digital Logic Design Concepts OR: What I Need to Know from Digital Logic Design (EEL3705)
Copyright © Curt Hill Finite State Machines The Simplest and Least Capable Automaton.
1 ENGG 1015 Tutorial Digital Logic (II) (70 pages) 15 Oct Learning Objectives  Learn about Boolean Algebra (SoP/PoS, DrMorgan's Theorem, simplification),
DLD Lecture 26 Finite State Machine Design Procedure.
1 Recap lecture 22 Applications of complementing and incrementing machines, Equivalent machines, Moore equivalent to Mealy, proof, example, Mealy equivalent.
ARITHMETIC MICRO OPERATIONS
Universal college of engineering & technology. .By Harsh Patel)
1 Recap lecture 21 Example of Moore machine, Mealy machine, Examples, complementing machine, Incrementing machine.
1 ENGG 1203 Tutorial Combinational Logic (II) and Sequential Logic (I) 8 Feb Learning Objectives  Apply Karnaugh map for logic simplification  Design.
CHAPTER 6 Sequential Circuits’ Analysis CHAPTER 6 Sequential Circuits’ Analysis Sichuan University Software College.
Lecture # 12. Nondeterministic Finite Automaton (NFA) Definition: An NFA is a TG with a unique start state and a property of having single letter as label.
Lecture 8 Theory of AUTOMATA
CS 203: Introduction to Formal Languages and Automata
Combinational Circuits
Digital Electronics Tutorial: Number System & Arithmetic Circuits Solutions.
Modeling Computation: Finite State Machines without Output
UNIT - I Formal Language and Regular Expressions: Languages Definition regular expressions Regular sets identity rules. Finite Automata: DFA NFA NFA with.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 10 Automata, Grammars and Languages.
Lecture # 15. Mealy machine A Mealy machine consists of the following 1. A finite set of states q 0, q 1, q 2, … where q 0 is the initial state. 2. An.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
1 Section 11.2 Finite Automata Can a machine(i.e., algorithm) recognize a regular language? Yes! Deterministic Finite Automata A deterministic finite automaton.
4–1. BSCS 5 th Semester Introduction Logic diagram: a graphical representation of a circuit –Each type of gate is represented by a specific graphical.
5.3 Sequential Circuits - An Introduction to Informatics WMN Lab. Hey-Jin Lee.
COMBINATIONAL AND SEQUENTIAL CIRCUITS Guided By: Prof. P. B. Swadas Prepared By: BIRLA VISHVAKARMA MAHAVDYALAYA.
Chapter 3 Boolean Algebra and Digital Logic T103: Computer architecture, logic and information processing.
Govt. Engineering College- Gandhinagar. It is all about……  STATE MACHINE.
State Diagrams Tuesday, 12 September State diagram Graphical representation of a state table. –Provides the same information as a state table. –A.
Lecture 06: Theory of Automata:08 Finite Automata with Output.
Lecture 14: Theory of Automata:2014 Finite Automata with Output.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
1 Advanced Theory of Computation Finite Automata with output Pumping Lemma Theorem.
Lecture # 16. Applications of Incrementing and Complementing machines 1’s complementing and incrementing machines which are basically Mealy machines are.
Reading: Hambley Chapters
Instructor: Alexander Stoytchev
Week 7: Gates and Circuits: PART II
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Recap lecture 19 NFA corresponding to Closure of FA, Examples, Memory required to recognize a language, Example, Distinguishing one string from another,
Recap lecture 23 Mealy machines in terms of sequential circuit.
Finite Automata with Output
Recap lecture 20 Recap Theorem, Example, Finite Automaton with output, Moore machine, Examples.
Finite Automaton with output
Mealy and Moore Machines
Presentation transcript:

Finite Automata (FA) with Output FA discussed so far, is just associated with R.Es or language. Is there exist an FA which generates an output string corresponding to each input string ? The answer is yes. Such machines are called machines with output. There are two types of machines with output. Moore and Mealy machines. 1

2 Moore Machine Created by E.F Moore in To Design a mathematical model for sequential circuits. A state machine that determines its outputs from the present state only. Moore machines is a Collection of Five Things 1) A finite set of states q0, q1, q2, … where q0 is the initial state. 2) An alphabet of letters ∑ = {a,b,c,…} from which the input strings are formed. 3) An alphabet Г ={x,y,z,…} of output characters from which output strings are generated. 4) δ: Transition function. 5) λ: output function. It depends on the state only. (λ= Q  Г )

3 Example-1 Consider the following Moore machine having the states q0, q1, q2, q3 where q0 is the start state and ∑= {a,b}, and Г={0,1} the transition table follows as Transition Table

4 Example-2 Pictorial Representation of Previous Moore Machine Input String = abbabbba Output String = Output can be determined by the following table It may be noted that the length of output string is l more than that of input string as the initial state prints out the extra character 1, before the input string is read

5 Sequential circuit (Block Diagram) Next State Logic State Register Output Logic Clock Current State Next State Input Depends on the Current State

6 Example-2 (A D-Flip flop type Moore Machine Consider the following Moore machine having the states A,B where A is the start state and ∑= {0,1}, and Г={0,1} the transition table follows as A/0B/ Old StatesNew States after Reading input Symbols Character to be printed 01 AAB0 BAB1 Moore Machine State Diagram

7 Mealy Machine Created by G.H Mealy in A state machine that determines its outputs from the present state and from the inputs. Mealy machines is a Collection of Five Things 1) A finite set of states q0, q1, q2, … where q0 is the initial state. 2) An alphabet of letters ∑ = {a,b,c,…} from which the input strings are formed. 3) An alphabet Г ={x,y,z,…} of output characters from which output strings are generated. 4) δ: Transition function. 5) λ: output function. It depends on the input and state. (λ= Qx ∑  Г ) All transitions are in the form i/o (input symbol/output character).

8 Example-1 Consider the following Mealy machine having the states q0, q1, q2, q3 where q0 is the start state and ∑= {a,b}, and Г={0,1} Input String= abbabbba Output String= It may be noted that in Mealy machine, the length of output string is equal to that of input string

Considered as a state machine, the turnstile has two states: Locked and Unlocked. [2] There are two inputs that affect its state: putting a coin in the slot (coin) and pushing the arm (push). In the locked state, pushing on the arm has no effect; no matter how many times the input push is given, it stays in the locked state. Putting a coin in – that is, giving the machine a coin input – shifts the state from Locked to Unlocked. In the unlocked state, putting additional coins in has no effect; that is, giving additional coin inputs does not change the state. However, a customer pushing through the arms, giving a push input, shifts the state back to Locked. [2]

10 Example-2 (Serial Adder) Consider the following Mealy machine having two states q 0, q 1 where q 0 is the start state and ∑= {00,01,10,11}, and Г={0,1} q 0 corresponds to No-carry State and q 1 corresponds to a carry State. In case of last bits, when there is 1 carry but you are not getting any input at q 1, so u will consider the 00 as input, it will output 1 and you will reach at State q 0. q0q0 q1q1 Start 00 / 0 01 / 110 / 1 11 / 0 00 / 1 10 / 0 01 / 0 11 /

11 Complementing Machine Consider the following Mealy machine having only one state q0 ∑= {0,1}, and Г={0,1} the transition table follows as If is run on this machine then the corresponding output string will be This machine is called Complementing machine.

12 Equivalent Machines Two machines are said to be equivalent if they print the same output string when the same input string is run on them. Two Moore machines may be equivalent. Similarly two Mealy machines may also be equivalent. But a Moore machine can’t be equivalent to any Mealy machine. However, ignoring the extra character printed by the Moore machine, there exists a Mealy machine which is equivalent to the Moore machine.

13 Theorem-1 Statement For every Moore machine there is a Mealy machine that is equivalent to it (ignoring the extra character printed by the Moore machine). Proof: Let M be a Moore machine, then shifting the output characters corresponding to each state to the labels of corresponding incoming transitions, machine thus obtained will be a Mealy machine equivalent to M. Note: ( It may be noted that while converting a Moore machine into an equivalent Mealy machine, the output character of a state will be ignored if there is no incoming transition at that state. A loop at a state is also supposed to be an incoming transition).

14 Example Moore Machine: Mealy Machine:

15 Example Running the string “abbabbba” on both the machines, the output string can be determined by the following table Same output is generated by both machines by ignoring the first output of Moore machine.

16 Theorem-2 Statement For every Mealy machine there is a Moore machine that is equivalent to it (ignoring the extra character printed the Moore machine). Proof: Let M be a Mealy machine. At each state there are two possibilities for incoming transitions, The incoming transitions have the same output character. The incoming transitions have different output characters. If all the transitions have same output characters, then shift that character to the corresponding state. If all the transitions have different output characters, then the state will be converted to as many states as the number of different output characters for these transitions, which shows that if this happens at state qi then qi will be converted to qi 1 and qi 2 i.e. if at qi there are the transitions with two output characters then qi 1 for one character and qi 2 for other character. Shift the output characters of the transitions to the corresponding new states qi 1 and qi 2. Moreover, these new states qi 1 and qi 2 should behave like qi as well. Continuing the process, the machine thus obtained, will be a Moore machine equivalent to Mealy machine M.

17 Note about Theorem-2 Note: It may be noted that if there is no incoming transition at certain state then any of the output characters may be associated with that state. It may also be noted that if the initial state is converted into more than one new states then only one of these new states will be considered to be the initial state.

18 Example: Mealy Machine: Shifting the output character 1 of transition b to q0

19 Example (Continued ….) Shifting the output character 0 of transition a to q1 Shifting the output character 1 of transition b to q2

20 Example (Continued ….) Splitting q3 into q3 1 and q3 2

21 Example (Continued ….) Running the string “abbabbba” on both the machines, the output strings can be determined by the following table Same output is generated by both machines by ignoring the first output of Moore machine.

22 Applications The various flip-flops, counters and shift registers are all examples of sequential machines (automatons). All these circuits contain memory elements. The flip-flops are the elementary memory elements. The counters and shift registers are composed of more than one such element. All the circuits are capable of assuming more than one state. Their outputs do not depend only on the inputs but also on the state in which the circuit is at the time when the input is acting on it. If we note carefully the circuits of all these elements, they have a feedback from the output to the input.

The serial binary adder or bit-serial adder is a digital circuit that performs binary addition bit by bit. The serial full adder has three single-bit inputs for the numbers to be added and the carry in. There are two single-bit outputs for the sum and carry out. The carry-in signal is the previously calculated carry-out signal. The addition is performed by adding each bit, lowest to highest, one per clock cycle.digital circuitbinaryadditionfull adder

THANKS