CS1Q Computer Systems Lecture 11 Simon Gay. Lecture 11CS1Q Computer Systems - Simon Gay 2 The D FlipFlop The RS flipflop stores one bit of information.

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

Lecture 13: Sequential Circuits
CS1Q Computer Systems Lecture 12 Simon Gay. Lecture 12CS1Q Computer Systems - Simon Gay 2 Design of Sequential Circuits The systematic design of sequential.
Chapter 7 Henry Hexmoor Registers and RTL
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits – I Flip-Flops A sequential circuit is a logic components whose outputs.
Lecture 22: Sequential Circuits Today’s topic –Clocks and sequential circuits –Finite state machines 1.
Chapter 3 Digital Logic Structures
1 Lecture 23 More Sequential Circuits Analysis. 2 Analysis of Combinational Vs. Sequential Circuits °Combinational : Boolean Equations Truth Table Output.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
Basic Register Typically, we store multi-bit items
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic CMOS logic elements Combinational logic elements and design.
Sequential Circuit Introduction to Counter
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
Counters  A counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship.
CHAPTER 3 Counters.  One of the common requirement in digital circuits/system is counting, both direction (forward and backward)  Digital clocks and.
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
EE345: Introduction to Microcontrollers Register and Counters Prof. Ahmad Abu-El-Haija.
Sequential Circuits Chapter 4 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S.
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
Registers and Counters
FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Topics n Basics of sequential machines. n Sequential machine specification. n Sequential.
Some Useful Circuits Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
1 COMP541 State Machines Montek Singh Feb 8, 2012.
CS1Q Computer Systems Lecture 10 Simon Gay. Lecture 10CS1Q Computer Systems - Simon Gay2 Combinational Circuits All the circuits we have seen so far are.
Rabie A. Ramadan Lecture 3
EE434 ASIC & Digital Systems
CS1Q Computer Systems Lecture 8
Lecture 23: Finite State Machines with no Outputs Acceptors & Recognizers.
CS1Q Computer Systems Lecture 11 Simon Gay. Lecture 11CS1Q Computer Systems - Simon Gay2 The D FlipFlop A 1-bit register is called a D flipflop. When.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
Sequential Logic Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer Organization and.
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
Counters Dr. Rebhi S. Baraka Logic Design (CSCI 2301) Department of Computer Science Faculty of Information Technology The Islamic University.
2017/4/24 CHAPTER 6 Counters Chapter 5 (Sections )
1 Lecture 22 Sequential Circuits Analysis. 2 Combinational vs. Sequential  Combinational Logic Circuit  Output is a function only of the present inputs.
1 CSE370, Lecture 15 Lecture 15 u Logistics n HW5 due this Friday n HW6 out today, due Friday Feb 20 n I will be away Friday, so no office hour n Bruce.
Introduction to State Machine
Chapter 3 Digital Logic Structures. 3-2 Combinational vs. Sequential Combinational Circuit always gives the same output for a given set of inputs  ex:
SEQUENTIAL LOGIC By Tom Fitch. Types of Circuits Combinational: Gates Combinational: Gates Sequential: Flip-Flops Sequential: Flip-Flops.
Copyright © Curt Hill Finite State Machines The Simplest and Least Capable Automaton.
VHDL Discussion Finite State Machines
VHDL Discussion Finite State Machines IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
Registers; State Machines Analysis Section 7-1 Section 5-4.
1 Lecture #11 EGR 277 – Digital Logic Ch. 5 - Synchronous Sequential Logic There are two primary classifications of logic circuits: 1.Combinational logic.
Digital System Design using VHDL
CS1Q Computer Systems Lecture 8
Finite State Machines 1.Finite state machines with output 2.Finite state machines with no output 3.DFA 4.NDFA.
Computing Machinery Chapter 4: Finite State Machines.
EEE515J1_L4-1/12 EEE515J1 ASICs and DIGITAL DESIGN EGBCDCNT.pdf An example of a synchronous sequential machine.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Synchronous Counter Design
Latches, Flip Flops, and Memory ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin – Madison.
Common Elements in Sequential Design. Lecture 3 topics  Registers and Register Transfer  Shift Registers  Counters Basic Counter Partial sequence counters.
Logic Design (CE1111 ) Lecture 6 (Chapter 6) Registers &Counters Prepared by Dr. Lamiaa Elshenawy 1.
COMBINATIONAL AND SEQUENTIAL CIRCUITS Guided By: Prof. P. B. Swadas Prepared By: BIRLA VISHVAKARMA MAHAVDYALAYA.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
Theory of Computation Automata Theory Dr. Ayman Srour.
1.3 Finite State Machines.
Finite State Machines Dr K R Bond 2009
CIS Automata and Formal Languages – Pei Wang
Dr. Clincy Professor of CS
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Outline Registers Counters 5/11/2019.
EGR 2131 Unit 12 Synchronous Sequential Circuits
Lecture One: Automata Theory Amjad Ali
Finite State Machine Continued
Presentation transcript:

CS1Q Computer Systems Lecture 11 Simon Gay

Lecture 11CS1Q Computer Systems - Simon Gay 2 The D FlipFlop The RS flipflop stores one bit of information. To store a 1 we have to input 1 on the S wire. To store a 0 we have to input 1 on the R wire. It would usually be more convenient to input the value we want to store, either 0 or 1, on a single input line. The D flipflop is a simple extension of the RS flipflop which allows this.

Lecture 11CS1Q Computer Systems - Simon Gay 3 The D FlipFlop We use the following diagrammatic representation of a D flipflop. A register (multi-bit storage unit) can be built from D flipflops. Here is a 4 bit register:

Lecture 11CS1Q Computer Systems - Simon Gay 4 The T FlipFlop If the Q output of a D flipflop is connected to the D input, the resulting circuit changes state (from 0 to 1, or from 1 to 0) at every clock tick. This is a T (for trigger) flipflop. DQ Q T

Lecture 11CS1Q Computer Systems - Simon Gay 5 The T FlipFlop If the Q output of a D flipflop is connected to the D input, the resulting circuit changes state (from 0 to 1, or from 1 to 0) at every clock tick. This is a T (for trigger) flipflop. DQ Q T 0 1 Suppose the stored value is 0 initially.

Lecture 11CS1Q Computer Systems - Simon Gay 6 The T FlipFlop If the Q output of a D flipflop is connected to the D input, the resulting circuit changes state (from 0 to 1, or from 1 to 0) at every clock tick. This is a T (for trigger) flipflop. DQ Q T 0 1 clock pulse

Lecture 11CS1Q Computer Systems - Simon Gay 7 The T FlipFlop If the Q output of a D flipflop is connected to the D input, the resulting circuit changes state (from 0 to 1, or from 1 to 0) at every clock tick. This is a T (for trigger) flipflop. DQ Q T 1 0 D input is stored.

Lecture 11CS1Q Computer Systems - Simon Gay 8 The T FlipFlop If the Q output of a D flipflop is connected to the D input, the resulting circuit changes state (from 0 to 1, or from 1 to 0) at every clock tick. This is a T (for trigger) flipflop. DQ Q T 1 0 clock pulse

Lecture 11CS1Q Computer Systems - Simon Gay 9 The T FlipFlop If the Q output of a D flipflop is connected to the D input, the resulting circuit changes state (from 0 to 1, or from 1 to 0) at every clock tick. This is a T (for trigger) flipflop. DQ Q T 0 1 D input is stored.

Lecture 11CS1Q Computer Systems - Simon Gay 10 The T FlipFlop If the Q output of a D flipflop is connected to the D input, the resulting circuit changes state (from 0 to 1, or from 1 to 0) at every clock tick. This is a T (for trigger) flipflop. DQ Q T 0 1 clock pulse

Lecture 11CS1Q Computer Systems - Simon Gay 11 The T FlipFlop If the Q output of a D flipflop is connected to the D input, the resulting circuit changes state (from 0 to 1, or from 1 to 0) at every clock tick. This is a T (for trigger) flipflop. DQ Q T 1 0 D input is stored.

Lecture 11CS1Q Computer Systems - Simon Gay 12 The T FlipFlop If the Q output of a D flipflop is connected to the D input, the resulting circuit changes state (from 0 to 1, or from 1 to 0) at every clock tick. This is a T (for trigger) flipflop. DQ Q T This is an example of the general structure of a sequential circuit (Lecture 10 Slide 3). There is one bit of memory, and at each clock cycle, the memory is updated by storing the negated output from the previous cycle.

Lecture 11CS1Q Computer Systems - Simon Gay 13 A Binary Counter When counting in binary, each bit changes its value when the bit to its right changes from 1 to a negative edge causes the bit on the left to change

Lecture 11CS1Q Computer Systems - Simon Gay 14 A Binary Counter T flipflops can be used to build a circuit which counts in binary, advancing by 1 on each clock cycle. Assuming that the flipflops are positive edge triggered, we need to convert a negative edge on an output into a positive edge on the next clock input. TTT CLOCK not Q0Q1Q2 a 3 bit counter the same idea works for any number of bits

Lecture 11CS1Q Computer Systems - Simon Gay 15 A Binary Counter T flipflops can be used to build a circuit which counts in binary, advancing by 1 on each clock cycle. Assuming that the flipflops are positive edge triggered, we need to convert a negative edge on an output into a positive edge on the next clock input. TTT CLOCK not Q0Q1Q2 a 3 bit counter the same idea works for any number of bits 000assume outputs are 0

Lecture 11CS1Q Computer Systems - Simon Gay 16 A Binary Counter T flipflops can be used to build a circuit which counts in binary, advancing by 1 on each clock cycle. Assuming that the flipflops are positive edge triggered, we need to convert a negative edge on an output into a positive edge on the next clock input. TTT CLOCK not Q0Q1Q2 a 3 bit counter the same idea works for any number of bits initially clock is 0

Lecture 11CS1Q Computer Systems - Simon Gay 17 A Binary Counter T flipflops can be used to build a circuit which counts in binary, advancing by 1 on each clock cycle. Assuming that the flipflops are positive edge triggered, we need to convert a negative edge on an output into a positive edge on the next clock input. TTT CLOCK not Q0Q1Q2 a 3 bit counter the same idea works for any number of bits clock becomes 1 Q0 changes

Lecture 11CS1Q Computer Systems - Simon Gay 18 A Binary Counter T flipflops can be used to build a circuit which counts in binary, advancing by 1 on each clock cycle. Assuming that the flipflops are positive edge triggered, we need to convert a negative edge on an output into a positive edge on the next clock input. TTT CLOCK not Q0Q1Q2 a 3 bit counter the same idea works for any number of bits clock becomes 0

Lecture 11CS1Q Computer Systems - Simon Gay 19 A Binary Counter T flipflops can be used to build a circuit which counts in binary, advancing by 1 on each clock cycle. Assuming that the flipflops are positive edge triggered, we need to convert a negative edge on an output into a positive edge on the next clock input. TTT CLOCK not Q0Q1Q2 a 3 bit counter the same idea works for any number of bits clock becomes 1 Q0 changes Q1 changes changes from 0 to 1

Lecture 11CS1Q Computer Systems - Simon Gay 20 A Binary Counter T flipflops can be used to build a circuit which counts in binary, advancing by 1 on each clock cycle. Assuming that the flipflops are positive edge triggered, we need to convert a negative edge on an output into a positive edge on the next clock input. TTT CLOCK not Q0Q1Q2 a 3 bit counter the same idea works for any number of bits clock becomes 0

Lecture 11CS1Q Computer Systems - Simon Gay 21 A Binary Counter T flipflops can be used to build a circuit which counts in binary, advancing by 1 on each clock cycle. Assuming that the flipflops are positive edge triggered, we need to convert a negative edge on an output into a positive edge on the next clock input. TTT CLOCK not Q0Q1Q2 a 3 bit counter the same idea works for any number of bits clock becomes 1 Q0 changes

Lecture 11CS1Q Computer Systems - Simon Gay 22 A Binary Counter T flipflops can be used to build a circuit which counts in binary, advancing by 1 on each clock cycle. Assuming that the flipflops are positive edge triggered, we need to convert a negative edge on an output into a positive edge on the next clock input. TTT CLOCK not Q0Q1Q2 a 3 bit counter the same idea works for any number of bits clock becomes 0

Lecture 11CS1Q Computer Systems - Simon Gay 23 A Binary Counter T flipflops can be used to build a circuit which counts in binary, advancing by 1 on each clock cycle. Assuming that the flipflops are positive edge triggered, we need to convert a negative edge on an output into a positive edge on the next clock input. TTT CLOCK not Q0Q1Q2 a 3 bit counter the same idea works for any number of bits clock becomes 1 Q0 changes changes from 0 to 1 Q1 changes Q2 changes

Lecture 11CS1Q Computer Systems - Simon Gay 24 A Binary Counter This design is sometimes called a ripple counter because of the way that the change in output propagates from bit to bit. When the outputs are 111, the next clock cycle changes the state to 000. The design can be extended to any number of bits.

Lecture 11CS1Q Computer Systems - Simon Gay 25 A Counter Application A 2 bit counter can be used to complete the design of a traffic light controller. The counter generates the binary numbers from 0 to 3 in sequence, and the circuit from Lecture 9 converts these numbers into the correct outputs for the Red, Amber and Green lights. Exercise: Why is this not quite a perfect traffic light controller?

Lecture 11CS1Q Computer Systems - Simon Gay 26 Finite State Machines A finite state machine is a system which can be in one of a finite number of states, and can change state. A change of state is called a transition. Example: traffic lights. red red & amber green amber Here there are four states, labelled with the lighting combinations. We think of the transitions as being caused by an external timer or clock. This is a transition diagram.

Lecture 11CS1Q Computer Systems - Simon Gay 27 Finite State Machines Example: 3 bit binary counter Usually the initial state is specified: in this case, probably 000.

Lecture 11CS1Q Computer Systems - Simon Gay 28 Finite State Machines A finite state machine is sometimes called a finite state automaton (plural: automata), and often abbreviated to FSM or FSA. An FSM is an abstract description or specification of a system with several possible states: for example, a sequential circuit. There are many variations of the basic idea. We can consider unlabelled transitions (as in the previous examples); labelled transitions in which the labels are viewed as inputs; outputs, which can be associated with either states or transitions; distinguished states with particular meanings. FSMs pop up all over Computing Science. In fact, every computer is a FSM, although it is often convenient to pretend that computers have unlimited memory and an infinite number of possible states.

Lecture 11CS1Q Computer Systems - Simon Gay 29 Finite State Machines Example: telephone. on hookoff hook ringing conversationringing conversation pick up dial answer put down incomingpick up put down Transitions are labelled but we’re not describing how each transition is activated. Of course this example leaves out many details of the real telephone system!

Lecture 11CS1Q Computer Systems - Simon Gay 30 Finite State Machines Example: web site. Any web site can be viewed as a finite state machine. Each state is a page, and each link is a transition to another state (page). Exercise: pick a web site and start to draw the transition diagram for the FSM which describes its structure. (Actually, many web sites contain dynamically generated pages which make it difficult to describe them as FSMs, but there is often an overall structure which can be thought of as an FSM.) This idea could help to answer questions like: Are all pages reachable? Is it easy to return to the home page?

Lecture 11CS1Q Computer Systems - Simon Gay 31 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal

Lecture 11CS1Q Computer Systems - Simon Gay 32 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input: 10101

Lecture 11CS1Q Computer Systems - Simon Gay 33 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input: 10101

Lecture 11CS1Q Computer Systems - Simon Gay 34 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input: accepted

Lecture 11CS1Q Computer Systems - Simon Gay 35 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input: 10101

Lecture 11CS1Q Computer Systems - Simon Gay 36 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input: 10101

Lecture 11CS1Q Computer Systems - Simon Gay 37 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input: 10101

Lecture 11CS1Q Computer Systems - Simon Gay 38 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input: accepted

Lecture 11CS1Q Computer Systems - Simon Gay 39 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input: 10101

Lecture 11CS1Q Computer Systems - Simon Gay 40 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input: 10101

Lecture 11CS1Q Computer Systems - Simon Gay 41 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input: 10101

Lecture 11CS1Q Computer Systems - Simon Gay 42 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input: accepted

Lecture 11CS1Q Computer Systems - Simon Gay 43 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input:

Lecture 11CS1Q Computer Systems - Simon Gay 44 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input: accepted

Lecture 11CS1Q Computer Systems - Simon Gay 45 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input:

Lecture 11CS1Q Computer Systems - Simon Gay 46 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input:

Lecture 11CS1Q Computer Systems - Simon Gay 47 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input:

Lecture 11CS1Q Computer Systems - Simon Gay 48 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input:

Lecture 11CS1Q Computer Systems - Simon Gay 49 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input:

Lecture 11CS1Q Computer Systems - Simon Gay 50 Finite State Machines as Accepters A particular kind of FSM accepts or recognises certain input sequences. Transitions are labelled with symbols from an input alphabet. One state is the initial state and some states are final or accepting states. If a sequence of input symbols is fed into the FSM, causing transitions, then the sequence is accepted if the last transition leads to a final state. Example: accepting binary sequences of the form 10101… ,1 initialfinal input: no escape!

Lecture 11CS1Q Computer Systems - Simon Gay 51 Finite State Machines as Accepters This is an important idea in Computing Science. Examples and applications occur in many places: searching for a particular string in a text file recognising programming language keywords, in a compiler studying the power of formal models of computation (which sets of strings can be recognised by a FSM?) For more information, consult any book with “formal languages” or “automata” in the title.

Lecture 11CS1Q Computer Systems - Simon Gay 52 The Mathematical Definition Mathematically, an accepting finite state machine of the kind we have just illustrated, is defined by the following. a finite set of states a finite set of symbols, called the input alphabet a function called the transition function a state called the initial state a set of final states (You are not expected to know this for the exam; but it is important to be familiar with the informal idea of a FSM.)