Course Overview. Shimon Schocken. Spring Course Overview 1 Elements of Computing Systems

Size: px
Start display at page:

Download "Course Overview. Shimon Schocken. Spring Course Overview 1 Elements of Computing Systems"

Transcription

1 IDC Herzliy Shimon Schocken Course Overview Shimon Schocken Spring 2005 Course Overview 1 Elements of Computing Systems Course gols Course ojectives: Understnd how HW+SW systems re uilt, nd how they work Lern how to rek complex prolems into simpler ones Lern how lrge scle development projects re plnned nd executed Hve fun. Methodology: Build / experiment with trnsprent computer tht we cn fully understnd. Course Overview 2 Elements of Computing Systems

2 Course theme nd structure Humn Thought Astrct design Chpters 9, 12 H.L. Lnguge & Operting Sys. Compiler Chpters Virtul Mchine Softwre hierrchy VM Trnsltor Chpters 7-8 Assemly Lnguge Assemler Chpter 6 Mchine Lnguge Computer Architecture Chpters 4-5 Hrdwre hierrchy Hrdwre Pltform Gte Logic Chpters 1-3 Chips & Logic Gtes Electricl Engineering Physics (Astrction implementtion prdigm) Course Overview 3 Elements of Computing Systems Resources nd rules Book Lectures Exercises Tools Course site Exm Projects Individul work policy Course Overview 4 Elements of Computing Systems

3 Appliction level: Pong Bll strction Bt strction Course Overview 5 Elements of Computing Systems The ig picture Humn Thought Astrct design Chpters 9, 12 H.L. Lnguge & Operting Sys. Compiler Chpters Virtul Mchine Softwre hierrchy VM Trnsltor Chpters 7-8 Assemly Lnguge Assemler Chpter 6 Mchine Lnguge Computer Architecture Chpters 4-5 Hrdwre hierrchy Hrdwre Pltform Gte Logic Chpters 1-3 Chips & Logic Gtes Electricl Engineering Physics Course Overview 6 Elements of Computing Systems

4 High-level progrmming /** A Grphic Bt for Pong Gme */ clss Bt { field int x, y; // screen loction of the t's top-left corner field int width, height; // t's width & height // The clss constructor nd most of the clss methods re omitted } /** Drws (color=true) or erses (color=flse) the t */ method void drw(oolen color) { do Screen.setColor(color); do Screen.drwRectngle(x,y,x+width,y+height); return; } /** Moves the t one step (4 pixels) to the right. */ method void mover() { do drw(flse); // erse the t t the current loction let x = x + 4; // chnge the t's X-loction // ut don't go eyond the screen's right order if ((x + width) > 511) { let x = width; } do drw(true); // re-drw the t in the new loction return; } A typicl cll to n operting system method Bll strction Bt strction Course Overview 7 Elements of Computing Systems Operting system level /** An OS-level screen driver tht strcts the computer's physicl screen */ clss Screen { sttic oolen currentcolor; // the current color // The Screen clss is collection of methods, ech implementing one // strct screen-oriented opertion. Most of this code is omitted. } /** Drws rectngle in the current color. */ // the rectngle's top left corner is nchored t screen loction (x0,y0) // nd its width nd length re x1 nd y1, respectively. function void drwrectngle(int x0, int y0, int x1, int y1) { vr int x, y; let x = x0; while (x < x1) { let y = y0; while(y < y1) { do Screen.drwPixel(x,y); let y = y+1; } let x = x+1; } } Course Overview 8 Elements of Computing Systems

5 The ig picture Humn Thought Astrct design Chpters 9, 12 H.L. Lnguge & Operting Sys. Compiler Chpters Virtul Mchine Softwre hierrchy VM Trnsltor Chpters 7-8 Assemly Lnguge Assemler Chpter 6 Mchine Lnguge Computer Architecture Chpters 4-5 Hrdwre hierrchy Hrdwre Pltform Gte Logic Chpters 1-3 Chips & Logic Gtes Electricl Engineering Physics Course Overview 9 Elements of Computing Systems The complete compiltion model Some... lnguge Some Other lnguge... Jck lnguge Proj. 9: uilding n pp. Proj. 12: uilding the OS Some compiler Some Other compiler Jck compiler Projects VM lnguge VM implementtion over CISC pltforms VM imp. over RISC pltforms VM emultor VM imp. over the Hck pltform Projects 7-8 CISC mchine lnguge RISC mchine lnguge... written in high-level lnguge Hck mchine lnguge Projects 1-6 CISC mchine RISC mchine other digitl pltforms, ech equipped with its VM implementtion Any computer Hck computer Course Overview 10 Elements of Computing Systems

6 Compiltion > Intermedite code Source code (x+width)>511 prsing x width code genertion push x push width dd push 511 gt Astrction Syntx Anlysis Prse Tree Semntic Synthesis Implementtion Modulrity The implementtion is lso n strction. Course Overview 11 Elements of Computing Systems The Virtul Mchine (VM) if ((x+width)>511) { let x=511-width; } // VM implementtion push x // s1 push width // s2 dd // s3 memory (efore)... width x sp s s4 s5 s9 push 511 gt if-goto L1 goto L2 // s4 // s5 // s6 // s7 sp sp 1 sp L1: push 511 push width su pop x L2:... // s8 // s9 // s10 // s11 sp s10 61 memory (fter)... width x Course Overview 12 Elements of Computing Systems

7 The ig picture Humn Thought Astrct design Chpters 9, 12 H.L. Lnguge & Operting Sys. Compiler Chpters Virtul Mchine Softwre hierrchy VM Trnsltor Chpters 7-8 Assemly Lnguge Assemler Chpter 6 Mchine Lnguge Computer Architecture Chpters 4-5 Hrdwre hierrchy Hrdwre Pltform Gte Logic Chpters 1-3 Chips & Logic Gtes Electricl Engineering Physics Course Overview 13 Elements of Computing Systems Low-level progrmming Virtul mchine progrm... push x push width dd push 511 gt if-goto L1 goto L2 L1: push 511 push width su pop x L2: VM trnsltor Assemly progrm // push D=A // A=M M=D M=M+1 // SP++ Assemler Executle Course Overview 14 Elements of Computing Systems

8 The ig picture Humn Thought Astrct design Chpters 9, 12 H.L. Lnguge & Operting Sys. Compiler Chpters Virtul Mchine Softwre hierrchy VM Trnsltor Chpters 7-8 Assemly Lnguge Assemler Chpter 6 Mchine Lnguge Computer Architecture Chpters 4-5 Hrdwre hierrchy Hrdwre Pltform Gte Logic Chpters 1-3 Chips & Logic Gtes Electricl Engineering Physics Course Overview 15 Elements of Computing Systems Mchine lnguge semntics Code semntics, s interpreted y the Hck hrdwre pltform Instruction code (0= ddress inst.) Address Code syntx M=M Instruction code (1= compute inst.) ALU opertion code Destintion Code Jump Code (M-1) (M) (no jump) We need HW rchitecture tht will relize this semntics The HW pltform should e designed to: Prse instructions, nd Execute them Course Overview 16 Elements of Computing Systems

9 Computer rchitecture instruction Instruction Memory D A M ALU dt Dt Memory (M) Progrm Counter ddress of next instruction dt in RAM(A) A typicl Von Neumnn mchine Course Overview 17 Elements of Computing Systems The ig picture Humn Thought Astrct design Chpters 9, 12 H.L. Lnguge & Operting Sys. Compiler Chpters Virtul Mchine Softwre hierrchy VM Trnsltor Chpters 7-8 Assemly Lnguge Assemler Chpter 6 Mchine Lnguge Computer Architecture Chpters 4-5 Hrdwre hierrchy Hrdwre Pltform Gte Logic Chpters 1-3 Chips & Logic Gtes Electricl Engineering Physics Course Overview 18 Elements of Computing Systems

10 Gte logic HW pltform = inter-connected set of chips Chips re mde of simpler chips, ll the wy down to logic gtes Logic gte = HW element tht implements certin Boolen function Every chip nd gte hs n interfce, specifying WHAT it is doing, nd n implementtion, specifying HOW it is doing it. Interfce Implementtion Xor Not And Or Not And Course Overview 19 Elements of Computing Systems Hrdwre Description Lnguge (HDL) Not And Or Not And CHIP Xor { IN,; OUT ; PARTS: Not(in=,=Not); Not(in=,=Not); And(=,=Not,=w1); And(=Not,=,=w2); Or(=w1,=w2,=); } Course Overview 20 Elements of Computing Systems

11 The tour ends Interfce Implementtion (CMOS) Nnd Course Overview 21 Elements of Computing Systems On the power of strctions Astrction: n ttempt to cpture in thought the essence of something Cognitive Mth Sciences Computer science Top down / ottom up Astrction Implementtion ( ) the sic theme Built using / Reduced into: Astrction Course Overview 22 Elements of Computing Systems

12 Fmous strction Course Overview 23 Elements of Computing Systems Finl note We delierte not ends, ut mens. For doctor does not delierte whether he shll hel, nor n ortor whether he shll persude... They ssume the end nd consider how nd y wht mens it is ttined, nd if it seems esily nd est produced therey; And if it is chieved y some mens, they consider how it will e chieved, nd y wht mens this will e chieved, until they come to the first cuse. And wht is lst in the order of nlysis seems to e first in the order of ecoming. Course Overview 24 Elements of Computing Systems

13 IDC Herzliy Shimon Schocken Boolen Logic Shimon Schocken Course Overview 25 Elements of Computing Systems Boolen lger Some elementry Boolen opertors: Not(x) And(x,y) Or(x,y) Nnd(x,y) Boolen functions: x y z f ( x, y, z) = ( x + y) z x Not(x) Not(x) x y Or(x,y) Or(x,y) x y And(x,y) And(x,y) x y Nnd(x,x) Nnd(x,x) Functionl expression VS truth tle expression Importnt result: Every Boolen function cn e expressed using And, Or, Not Course Overview 26 Elements of Computing Systems

14 All Boolen functions of 2 vriles Course Overview 27 Elements of Computing Systems Boolen lger Given: Nnd(,), flse Not() = Nnd(,) true = Not(flse) And(,) =... George Boole, ( A Clculus of Logic ) Or(,) =... Xor(,) =... Etc. Course Overview 28 Elements of Computing Systems

15 Gte logic Gte logic gte rchitecture designed to implement oolen function Elementry gtes: Composite gtes: Interfce VS implementtion. Course Overview 29 Elements of Computing Systems Circuit implementtions AND gte OR gte power supply power supply c c AND (,,c) c AND AND Physicl reliztions of logic gtes re irrelevnt to computer science. Course Overview 30 Elements of Computing Systems

16 Gte Logic Interfce Xor Clude Shnnon, Implementtion Not And ( Symolic Anlysis of Rely nd Switching Circuits ) Or Not And Xor(,)=Or(,Not(),Not(),)) Course Overview 31 Elements of Computing Systems Project 1: elementry logic gtes Given: Nnd(,), flse Build: Nnd(,) Nnd(,) Not() =... true =... And(,) =... Or(,) =... Mux(s,,) =... Etc gtes ltogether. Course Overview 32 Elements of Computing Systems

17 Building n And gte And And.cmp Contrct: When running your.hdl on our.tst, your. should e the sme s our.cmp. And.hdl And.tst CHIP CHIP And And { IN IN,, ; ; OUT OUT ; ; // // implementtion missing missing } lod lod And.hdl, And.hdl, put-file And., And., compre-to And.cmp, And.cmp, put-list ; ; set set 0,set 0,set 0,evl,put; set set 0,set 0,set 1,evl,put; set set 1,set 1,set 0,evl,put; set set 1, 1, set set 1, 1, evl, evl, put; put; Course Overview 33 Elements of Computing Systems Building n And gte Implementtion: And(,) = Not(Nnd(,)) NAND x in NOT And.hdl CHIP CHIP And And { IN IN,, ; ; OUT OUT ; ; Nnd( Nnd( =,, =,, = x); x); Not(in Not(in = x, x, = ) ) } Course Overview 34 Elements of Computing Systems

18 Hrdwre simultor HDL progrm test script put file Course Overview 35 Elements of Computing Systems Multiplexor (n interesting chip) sel sel Mux sel 0 1 Implementtion: sed on Not, And, Or gtes. Course Overview 36 Elements of Computing Systems

19 Cnonicl representtion Suspect function (-l-leinitz): Ech suspect my or my not hve n lii (), motivtion to commit the crime (m), nd reltionship to the wepon found in the scene of the crime (w). The police decides to focus ttention only on suspects for whom the proposition Not() And (m Or w) is true. Truth tle of the "suspect" function s (, m, w) = ( m + w) Cnonicl form: s (, m, w) = m w + mw + mw Course Overview 37 Elements of Computing Systems Two possile implementtions s (, m, w) = ( m + w) m w nd or s s (, m, w) = m w + mw + mw m w nd nd or s nd Course Overview 38 Elements of Computing Systems

20 Progrmmle Logic Device for 3-wy functions c nd legend: ctive fuse lown fuse 8 nd terms connected to the sme 3 inputs. or f(,,c) nd single or term connected to the puts of 8 nd terms _ PLD implementtion of f(,,c)= c + c (the on/off sttes of the fuses determine which gtes prticipte in the computtion) Course Overview 39 Elements of Computing Systems Some oservtions Ech Boolen function hs cnonicl representtion The cnonicl representtion is expressed in terms of And, Not, Or And, Not, Or cn e expressed in terms of Nnd lone Ergo, every Boolen function cn e relized y strndrd PLD consisting of Nnd gtes only Mss production c nd Universl uilding locks, unique connectivity (neurons).. or f(,,c) nd Course Overview 40 Elements of Computing Systems

21 IDC Herzliy Shimon Schocken Boolen Arithmetic Shimon Schocken Course Overview 41 Elements of Computing Systems Counting systems quntity deciml inry 3-it register overflow overflow overflow Course Overview 42 Elements of Computing Systems

22 Rtionle (9038) ten = = 9038 (10011) two = = 19 ( x n x n 1... x0 ) n = x i= 0 i i Course Overview 43 Elements of Computing Systems Binry ddition Assuming 4-it system: no overflow overflow Algorithm: exctly the sme s in deciml ddition Overflow (MSB crry) hs to e delt with. Course Overview 44 Elements of Computing Systems

23 Representing negtive numers (4-it system) The codes of ll positive numers egin with 0 The codes of ll negtive numers egin with 1 To convert numer: leve ll triling 0 s nd first 1 intct, nd flip ll the remining its Exmple: 2-5 = 2 + (-5) = = -3 Course Overview 45 Elements of Computing Systems Building n Adder chip it dder 16 Adder: chip designed to dd two integers The construction hierrchy: Hlf dder: designed to dd 2 its Full dder: designed to dd 3 its Adder: designed to dd two n-it numers Course Overview 46 Elements of Computing Systems

24 Hlf dder (designed to dd 2 its) crry sum hlf dder sum crry Implementtion: sed on two gtes tht you ve seen efore. Course Overview 47 Elements of Computing Systems Full dder (designed to dd 3 its) c crry sum c full dder sum crry Implementtion: cn e sed on hlf-dder gtes. Course Overview 48 Elements of Computing Systems

25 n-it Adder it dder Implementtion: rry of full-dder gtes Course Overview 49 Elements of Computing Systems The ALU (of the Hck pltform) hlf dder sum crry c full dder sum crry x y it dder 16 zx nx zy ny f no (x, y, control its) = x+y, x-y, y x, x y 16 its 16 its ALU 16 its 0, 1, -1, x, y, -x, -y, x!, y!, x+1, y+1, x-1, y-1, zr ng x&y, x y Course Overview 50 Elements of Computing Systems

26 ALU logic Course Overview 51 Elements of Computing Systems The ALU in the CPU context c1,c2,,c6 D D A A M Mux A/M ALU RAM Course Overview 52 Elements of Computing Systems

27 End note: Leinitz Descried inry clculus nd 4-it dder in 1694 The inry system my e used in plce of the deciml system; express ll numers y unity nd y nothing Prctice: uilt one of the first mechnicl clcultors Theory: dremed univerl, forml, lnguge of thought -- the Chrcteristic Universlis The drem s end: Turing nd Goedl in 1930 s. Course Overview 53 Elements of Computing Systems

Chapter 1: Boolean Logic

Chapter 1: Boolean Logic Elements of Computing Systems, Nisn & Schocken, MIT Press, 2005 www.idc.c.il/tecs Chpter 1: Boolen Logic Usge nd Copyright Notice: Copyright 2005 Nom Nisn nd Shimon Schocken This presenttion contins lecture

More information

Elements of Computing Systems, Nisan & Schocken, MIT Press. Boolean Logic

Elements of Computing Systems, Nisan & Schocken, MIT Press. Boolean Logic Elements of Computing Systems, Nisn & Schocken, MIT Press www.idc.c.il/tecs Usge nd Copyright Notice: Boolen Logic Copyright 2005 Nom Nisn nd Shimon Schocken This presenttion contins lecture mterils tht

More information

Boolean Logic. Building a Modern Computer From First Principles.

Boolean Logic. Building a Modern Computer From First Principles. Boolen Logic Building Modern Computer From First Principles www.nnd2tetris.org Elements of Computing Systems, Nisn & Schocken, MIT Press, www.nnd2tetris.org, Chpter 1: Boolen Logic slide 1 Usge nd Copyright

More information

Boolean algebra.

Boolean algebra. http://en.wikipedi.org/wiki/elementry_boolen_lger Boolen lger www.tudorgir.com Computer science is not out computers, it is out computtion nd informtion. computtion informtion computer informtion Turing

More information

expression simply by forming an OR of the ANDs of all input variables for which the output is

expression simply by forming an OR of the ANDs of all input variables for which the output is 2.4 Logic Minimiztion nd Krnugh Mps As we found ove, given truth tle, it is lwys possile to write down correct logic expression simply y forming n OR of the ANDs of ll input vriles for which the output

More information

IST 4 Information and Logic

IST 4 Information and Logic IST 4 Informtion nd Logic T = tody x= hw#x out x= hw#x due mon tue wed thr 28 M1 oh 1 4 oh M1 11 oh oh 1 2 M2 18 oh oh 2 fri oh oh = office hours oh 25 oh M2 2 3 oh midterms oh Mx= MQx out 9 oh 3 T 4 oh

More information

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation CS2N: The Coming Revolution in Computer Architecture Lortory 2 Preprtion Ojectives:. Understnd the principle of sttic CMOS gte circuits 2. Build simple logic gtes from MOS trnsistors 3. Evlute these gtes

More information

Overview of Today s Lecture:

Overview of Today s Lecture: CPS 4 Computer Orgniztion nd Progrmming Lecture : Boolen Alger & gtes. Roert Wgner CPS4 BA. RW Fll 2 Overview of Tody s Lecture: Truth tles, Boolen functions, Gtes nd Circuits Krnugh mps for simplifying

More information

IST 4 Information and Logic

IST 4 Information and Logic IST 4 Informtion nd Logic mon tue wed thr fri sun T = tody 3 M1 oh 1 x= hw#x out 10 oh M1 17 oh oh 1 2 M2 oh oh x= hw#x due 24 oh oh 2 oh = office hours oh 1 oh M2 8 3 oh midterms oh oh Mx= MQx out 15

More information

Lecture 3. Introduction digital logic. Notes. Notes. Notes. Representations. February Bern University of Applied Sciences.

Lecture 3. Introduction digital logic. Notes. Notes. Notes. Representations. February Bern University of Applied Sciences. Lecture 3 Ferury 6 ern University of pplied ciences ev. f57fc 3. We hve seen tht circuit cn hve multiple (n) inputs, e.g.,, C, We hve lso seen tht circuit cn hve multiple (m) outputs, e.g. X, Y,, ; or

More information

Introduction to Electrical & Electronic Engineering ENGG1203

Introduction to Electrical & Electronic Engineering ENGG1203 Introduction to Electricl & Electronic Engineering ENGG23 2 nd Semester, 27-8 Dr. Hden Kwok-H So Deprtment of Electricl nd Electronic Engineering Astrction DIGITAL LOGIC 2 Digitl Astrction n Astrct ll

More information

Lecture 6. Notes. Notes. Notes. Representations Z A B and A B R. BTE Electronics Fundamentals August Bern University of Applied Sciences

Lecture 6. Notes. Notes. Notes. Representations Z A B and A B R. BTE Electronics Fundamentals August Bern University of Applied Sciences Lecture 6 epresenttions epresenttions TE52 - Electronics Fundmentls ugust 24 ern University of pplied ciences ev. c2d5c88 6. Integers () sign-nd-mgnitude representtion The set of integers contins the Nturl

More information

Fast Boolean Algebra

Fast Boolean Algebra Fst Boolen Alger ELEC 267 notes with the overurden removed A fst wy to lern enough to get the prel done honorly Printed; 3//5 Slide Modified; Jnury 3, 25 John Knight Digitl Circuits p. Fst Boolen Alger

More information

FABER Formal Languages, Automata and Models of Computation

FABER Formal Languages, Automata and Models of Computation DVA337 FABER Forml Lnguges, Automt nd Models of Computtion Lecture 5 chool of Innovtion, Design nd Engineering Mälrdlen University 2015 1 Recp of lecture 4 y definition suset construction DFA NFA stte

More information

Convert the NFA into DFA

Convert the NFA into DFA Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:

More information

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Fall Notes - Unit 1

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Fall Notes - Unit 1 INTRODUTION TO LOGI IRUITS Notes - Unit 1 OOLEN LGER This is the oundtion or designing nd nlyzing digitl systems. It dels with the cse where vriles ssume only one o two vlues: TRUE (usully represented

More information

Combinational Logic. Precedence. Quick Quiz 25/9/12. Schematics à Boolean Expression. 3 Representations of Logic Functions. Dr. Hayden So.

Combinational Logic. Precedence. Quick Quiz 25/9/12. Schematics à Boolean Expression. 3 Representations of Logic Functions. Dr. Hayden So. 5/9/ Comintionl Logic ENGG05 st Semester, 0 Dr. Hyden So Representtions of Logic Functions Recll tht ny complex logic function cn e expressed in wys: Truth Tle, Boolen Expression, Schemtics Only Truth

More information

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted

More information

CS S-12 Turing Machine Modifications 1. When we added a stack to NFA to get a PDA, we increased computational power

CS S-12 Turing Machine Modifications 1. When we added a stack to NFA to get a PDA, we increased computational power CS411-2015S-12 Turing Mchine Modifictions 1 12-0: Extending Turing Mchines When we dded stck to NFA to get PDA, we incresed computtionl power Cn we do the sme thing for Turing Mchines? Tht is, cn we dd

More information

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata CS103B ndout 18 Winter 2007 Ferury 28, 2007 Finite Automt Initil text y Mggie Johnson. Introduction Severl childrens gmes fit the following description: Pieces re set up on plying ord; dice re thrown or

More information

Resources. Introduction: Binding. Resource Types. Resource Sharing. The type of a resource denotes its ability to perform different operations

Resources. Introduction: Binding. Resource Types. Resource Sharing. The type of a resource denotes its ability to perform different operations Introduction: Binding Prt of 4-lecture introduction Scheduling Resource inding Are nd performnce estimtion Control unit synthesis This lecture covers Resources nd resource types Resource shring nd inding

More information

IST 4 Information and Logic

IST 4 Information and Logic IST 4 Informtion nd Logic T = tody x= hw#x out x= hw#x due mon tue wed thr fri 31 M1 1 7 oh M1 14 oh 1 oh 2M2 21 oh oh 2 oh Mx= MQx out Mx= MQx due 28 oh M2 oh oh = office hours 5 3 12 oh 3 T 4 oh oh 19

More information

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS CS 310 (sec 20) - Winter 2003 - Finl Exm (solutions) SOLUTIONS 1. (Logic) Use truth tles to prove the following logicl equivlences: () p q (p p) (q q) () p q (p q) (p q) () p q p q p p q q (q q) (p p)

More information

Math 154B Elementary Algebra-2 nd Half Spring 2015

Math 154B Elementary Algebra-2 nd Half Spring 2015 Mth 154B Elementry Alger- nd Hlf Spring 015 Study Guide for Exm 4, Chpter 9 Exm 4 is scheduled for Thursdy, April rd. You my use " x 5" note crd (oth sides) nd scientific clcultor. You re expected to know

More information

The transformation to right derivation is called the canonical reduction sequence. Bottom-up analysis

The transformation to right derivation is called the canonical reduction sequence. Bottom-up analysis Bottom-up nlysis Shift-reduce prsing. Constructs the derivtion tree from ottom to top. Reduces the string to the strt symol. Produces reverse right derivtion. Exmple: G(E): 1. E E + T 2. T 3. T T * F 4.

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 2 1. Prove ((( p q) q) p) is tutology () (3pts) y truth tle. p q p q

More information

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS The University of Nottinghm SCHOOL OF COMPUTER SCIENCE LEVEL 2 MODULE, SPRING SEMESTER 2016 2017 LNGUGES ND COMPUTTION NSWERS Time llowed TWO hours Cndidtes my complete the front cover of their nswer ook

More information

Nondeterminism and Nodeterministic Automata

Nondeterminism and Nodeterministic Automata Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely

More information

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

Lecture 3: Equivalence Relations

Lecture 3: Equivalence Relations Mthcmp Crsh Course Instructor: Pdric Brtlett Lecture 3: Equivlence Reltions Week 1 Mthcmp 2014 In our lst three tlks of this clss, we shift the focus of our tlks from proof techniques to proof concepts

More information

Reasoning and programming. Lecture 5: Invariants and Logic. Boolean expressions. Reasoning. Examples

Reasoning and programming. Lecture 5: Invariants and Logic. Boolean expressions. Reasoning. Examples Chir of Softwre Engineering Resoning nd progrmming Einführung in die Progrmmierung Introduction to Progrmming Prof. Dr. Bertrnd Meyer Octoer 2006 Ferury 2007 Lecture 5: Invrints nd Logic Logic is the sis

More information

7.1 Integral as Net Change and 7.2 Areas in the Plane Calculus

7.1 Integral as Net Change and 7.2 Areas in the Plane Calculus 7.1 Integrl s Net Chnge nd 7. Ares in the Plne Clculus 7.1 INTEGRAL AS NET CHANGE Notecrds from 7.1: Displcement vs Totl Distnce, Integrl s Net Chnge We hve lredy seen how the position of n oject cn e

More information

6.004 Computation Structures Spring 2009

6.004 Computation Structures Spring 2009 MIT OpenCourseWre http://ocw.mit.edu 6.004 Computtion Structures Spring 009 For informtion out citing these mterils or our Terms of Use, visit: http://ocw.mit.edu/terms. Cost/Performnce Trdeoffs: cse study

More information

EECS 141 Due 04/19/02, 5pm, in 558 Cory

EECS 141 Due 04/19/02, 5pm, in 558 Cory UIVERSITY OF CALIFORIA College of Engineering Deprtment of Electricl Engineering nd Computer Sciences Lst modified on April 8, 2002 y Tufn Krlr (tufn@eecs.erkeley.edu) Jn M. Rey, Andrei Vldemirescu Homework

More information

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-378: Computer Hardware Design Winter Notes - Unit 1

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-378: Computer Hardware Design Winter Notes - Unit 1 ELETRIL ND OMPUTER ENGINEERING DEPRTMENT, OKLND UNIVERSIT EE-78: omputer Hrdwre Design Winter 016 INTRODUTION TO LOGI IRUITS Notes - Unit 1 OOLEN LGER This is the oundtion or designing nd nlyzing digitl

More information

Digital Control of Electric Drives

Digital Control of Electric Drives igitl Control o Electric rives Logic Circuits - Comintionl Boolen Alger, escription Form Czech Technicl University in Prgue Fculty o Electricl Engineering Ver.. J. Zdenek Logic Comintionl Circuit Logic

More information

CS 314 Principles of Programming Languages

CS 314 Principles of Programming Languages C 314 Principles of Progrmming Lnguges Lecture 6: LL(1) Prsing Zheng (Eddy) Zhng Rutgers University Ferury 5, 2018 Clss Informtion Homework 2 due tomorrow. Homework 3 will e posted erly next week. 2 Top

More information

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A.

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A. 378 Reltions 16.7 Solutions for Chpter 16 Section 16.1 Exercises 1. Let A = {0,1,2,3,4,5}. Write out the reltion R tht expresses > on A. Then illustrte it with digrm. 2 1 R = { (5,4),(5,3),(5,2),(5,1),(5,0),(4,3),(4,2),(4,1),

More information

Designing Information Devices and Systems I Spring 2018 Homework 7

Designing Information Devices and Systems I Spring 2018 Homework 7 EECS 16A Designing Informtion Devices nd Systems I Spring 2018 omework 7 This homework is due Mrch 12, 2018, t 23:59. Self-grdes re due Mrch 15, 2018, t 23:59. Sumission Formt Your homework sumission should

More information

Boolean Algebra. Boolean Algebra

Boolean Algebra. Boolean Algebra Boolen Alger Boolen Alger A Boolen lger is set B of vlues together with: - two inry opertions, commonly denoted y + nd, - unry opertion, usully denoted y ˉ or ~ or, - two elements usully clled zero nd

More information

Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15

Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15 Regulr Lnguge Nonregulr Lnguges The Pumping Lemm Models of Comput=on Chpter 10 Recll, tht ny lnguge tht cn e descried y regulr expression is clled regulr lnguge In this lecture we will prove tht not ll

More information

COMPUTER SCIENCE TRIPOS

COMPUTER SCIENCE TRIPOS CST.2011.2.1 COMPUTER SCIENCE TRIPOS Prt IA Tuesdy 7 June 2011 1.30 to 4.30 COMPUTER SCIENCE Pper 2 Answer one question from ech of Sections A, B nd C, nd two questions from Section D. Submit the nswers

More information

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2016 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 9 1. (4pts) ((p q) (q r)) (p r), prove tutology using truth tles. p

More information

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1 CS4 45- Determinisitic Finite Automt -: Genertors vs. Checkers Regulr expressions re one wy to specify forml lnguge String Genertor Genertes strings in the lnguge Deterministic Finite Automt (DFA) re nother

More information

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model? CS125 Lecture 11 Fll 2016 11.1 Finite Automt Motivtion: TMs without tpe: mybe we cn t lest fully understnd such simple model? Algorithms (e.g. string mtching) Computing with very limited memory Forml verifiction

More information

The practical version

The practical version Roerto s Notes on Integrl Clculus Chpter 4: Definite integrls nd the FTC Section 7 The Fundmentl Theorem of Clculus: The prcticl version Wht you need to know lredy: The theoreticl version of the FTC. Wht

More information

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4 Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one

More information

Section 6.1 INTRO to LAPLACE TRANSFORMS

Section 6.1 INTRO to LAPLACE TRANSFORMS Section 6. INTRO to LAPLACE TRANSFORMS Key terms: Improper Integrl; diverge, converge A A f(t)dt lim f(t)dt Piecewise Continuous Function; jump discontinuity Function of Exponentil Order Lplce Trnsform

More information

Fault Modeling. EE5375 ADD II Prof. MacDonald

Fault Modeling. EE5375 ADD II Prof. MacDonald Fult Modeling EE5375 ADD II Prof. McDonld Stuck At Fult Models l Modeling of physicl defects (fults) simplify to logicl fult l stuck high or low represents mny physicl defects esy to simulte technology

More information

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh Lnguges nd Automt Finite Automt Informtics 2A: Lecture 3 John Longley School of Informtics University of Edinburgh jrl@inf.ed.c.uk 22 September 2017 1 / 30 Lnguges nd Automt 1 Lnguges nd Automt Wht is

More information

First Midterm Examination

First Midterm Examination Çnky University Deprtment of Computer Engineering 203-204 Fll Semester First Midterm Exmintion ) Design DFA for ll strings over the lphet Σ = {,, c} in which there is no, no nd no cc. 2) Wht lnguge does

More information

Jin-Fu Li. Department of Electrical Engineering National Central University Jhongli, Taiwan

Jin-Fu Li. Department of Electrical Engineering National Central University Jhongli, Taiwan Trnsprent BIST for RAMs Jin-Fu Li Advnced d Relible Systems (ARES) Lb. Deprtment of Electricl Engineering Ntionl Centrl University Jhongli, Tiwn Outline Introduction Concept of Trnsprent Test Trnsprent

More information

More on automata. Michael George. March 24 April 7, 2014

More on automata. Michael George. March 24 April 7, 2014 More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose

More information

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh Finite Automt Informtics 2A: Lecture 3 Mry Cryn School of Informtics University of Edinburgh mcryn@inf.ed.c.uk 21 September 2018 1 / 30 Lnguges nd Automt Wht is lnguge? Finite utomt: recp Some forml definitions

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, section 003, George Mson University, Fll 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Septemer 7 1. Prove (p q) (p q), () (5pts) using truth tles. p q

More information

Parse trees, ambiguity, and Chomsky normal form

Parse trees, ambiguity, and Chomsky normal form Prse trees, miguity, nd Chomsky norml form In this lecture we will discuss few importnt notions connected with contextfree grmmrs, including prse trees, miguity, nd specil form for context-free grmmrs

More information

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science CSCI 340: Computtionl Models Trnsition Grphs Chpter 6 Deprtment of Computer Science Relxing Restrints on Inputs We cn uild n FA tht ccepts only the word! 5 sttes ecuse n FA cn only process one letter t

More information

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages Deprtment of Computer Science, Austrlin Ntionl University COMP2600 Forml Methods for Softwre Engineering Semester 2, 206 Assignment Automt, Lnguges, nd Computility Smple Solutions Finite Stte Automt nd

More information

Coalgebra, Lecture 15: Equations for Deterministic Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined

More information

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA) Finite Automt (FA or DFA) CHAPTER Regulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, equivlence of NFAs DFAs, closure under regulr

More information

CISC 4090 Theory of Computation

CISC 4090 Theory of Computation 9/6/28 Stereotypicl computer CISC 49 Theory of Computtion Finite stte mchines & Regulr lnguges Professor Dniel Leeds dleeds@fordhm.edu JMH 332 Centrl processing unit (CPU) performs ll the instructions

More information

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tle of Contents: Week 1: Preliminries (set lger, reltions, functions) (red Chpters 1-4) Weeks

More information

CHAPTER 1 PROGRAM OF MATRICES

CHAPTER 1 PROGRAM OF MATRICES CHPTER PROGRM OF MTRICES -- INTRODUCTION definition of engineering is the science y which the properties of mtter nd sources of energy in nture re mde useful to mn. Thus n engineer will hve to study the

More information

Overview HC9. Parsing: Top-Down & LL(1) Context-Free Grammars (1) Introduction. CFGs (3) Context-Free Grammars (2) Vertalerbouw HC 9: Ch.

Overview HC9. Parsing: Top-Down & LL(1) Context-Free Grammars (1) Introduction. CFGs (3) Context-Free Grammars (2) Vertalerbouw HC 9: Ch. Overview H9 Vertlerouw H 9: Prsing: op-down & LL(1) do 3 mei 2001 56 heo Ruys h. 8 - Prsing 8.1 ontext-free Grmmrs 8.2 op-down Prsing 8.3 LL(1) Grmmrs See lso [ho, Sethi & Ullmn 1986] for more thorough

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

Control with binary code. William Sandqvist

Control with binary code. William Sandqvist Control with binry code Dec Bin He Oct 218 10 11011010 2 DA 16 332 8 E 1.1c Deciml to Binäry binry weights: 1024 512 256 128 64 32 16 8 4 2 1 71 10? 2 E 1.1c Deciml to Binäry binry weights: 1024 512 256

More information

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

More information

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 utomt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Prolem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) nton Setzer (Bsed on ook drft y J. V. Tucker nd K. Stephenson)

More information

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014 CS125 Lecture 12 Fll 2014 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

Introduction to Algebra - Part 2

Introduction to Algebra - Part 2 Alger Module A Introduction to Alger - Prt Copright This puliction The Northern Alert Institute of Technolog 00. All Rights Reserved. LAST REVISED Oct., 008 Introduction to Alger - Prt Sttement of Prerequisite

More information

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows:

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows: Improper Integrls The First Fundmentl Theorem of Clculus, s we ve discussed in clss, goes s follows: If f is continuous on the intervl [, ] nd F is function for which F t = ft, then ftdt = F F. An integrl

More information

First Midterm Examination

First Midterm Examination 24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet

More information

Advanced Algebra & Trigonometry Midterm Review Packet

Advanced Algebra & Trigonometry Midterm Review Packet Nme Dte Advnced Alger & Trigonometry Midterm Review Pcket The Advnced Alger & Trigonometry midterm em will test your generl knowledge of the mteril we hve covered since the eginning of the school yer.

More information

Let's start with an example:

Let's start with an example: Finite Automt Let's strt with n exmple: Here you see leled circles tht re sttes, nd leled rrows tht re trnsitions. One of the sttes is mrked "strt". One of the sttes hs doule circle; this is terminl stte

More information

Formal Language and Automata Theory (CS21004)

Formal Language and Automata Theory (CS21004) Forml Lnguge nd Automt Forml Lnguge nd Automt Theory (CS21004) Khrgpur Khrgpur Khrgpur Forml Lnguge nd Automt Tle of Contents Forml Lnguge nd Automt Khrgpur 1 2 3 Khrgpur Forml Lnguge nd Automt Forml Lnguge

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

Good Review book ( ) ( ) ( )

Good Review book ( ) ( ) ( ) 7/31/2011 34 Boolen (Switching) Algebr Review Good Review book BeBop to the Boolen Boogie: An Unconventionl Guide to Electronics, 2 nd ed. by Clive Mxwell Hightext Publictions Inc. from Amzon.com for pprox.

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More

More information

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018 CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA

More information

Some Theory of Computation Exercises Week 1

Some Theory of Computation Exercises Week 1 Some Theory of Computtion Exercises Week 1 Section 1 Deterministic Finite Automt Question 1.3 d d d d u q 1 q 2 q 3 q 4 q 5 d u u u u Question 1.4 Prt c - {w w hs even s nd one or two s} First we sk whether

More information

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique? XII. LINEAR ALGEBRA: SOLVING SYSTEMS OF EQUATIONS Tody we re going to tlk out solving systems of liner equtions. These re prolems tht give couple of equtions with couple of unknowns, like: 6= x + x 7=

More information

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1 Chpter 1, Prt 1 Regulr Lnguges CSC527, Chpter 1, Prt 1 c 2012 Mitsunori Ogihr 1 Finite Automt A finite utomton is system for processing ny finite sequence of symols, where the symols re chosen from finite

More information

u( t) + K 2 ( ) = 1 t > 0 Analyzing Damped Oscillations Problem (Meador, example 2-18, pp 44-48): Determine the equation of the following graph.

u( t) + K 2 ( ) = 1 t > 0 Analyzing Damped Oscillations Problem (Meador, example 2-18, pp 44-48): Determine the equation of the following graph. nlyzing Dmped Oscilltions Prolem (Medor, exmple 2-18, pp 44-48): Determine the eqution of the following grph. The eqution is ssumed to e of the following form f ( t) = K 1 u( t) + K 2 e!"t sin (#t + $

More information

Scanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy:

Scanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy: Scnner Specifying ptterns source code tokens scnner prser IR A scnner must recognize the units of syntx Some prts re esy: errors mps chrcters into tokens the sic unit of syntx x = x + y; ecomes

More information

Normal Forms for Context-free Grammars

Normal Forms for Context-free Grammars Norml Forms for Context-free Grmmrs 1 Linz 6th, Section 6.2 wo Importnt Norml Forms, pges 171--178 2 Chomsky Norml Form All productions hve form: A BC nd A vrile vrile terminl 3 Exmples: S AS S AS S S

More information

Designing Information Devices and Systems I Fall 2016 Babak Ayazifar, Vladimir Stojanovic Homework 6. This homework is due October 11, 2016, at Noon.

Designing Information Devices and Systems I Fall 2016 Babak Ayazifar, Vladimir Stojanovic Homework 6. This homework is due October 11, 2016, at Noon. EECS 16A Designing Informtion Devices nd Systems I Fll 2016 Bk Ayzifr, Vldimir Stojnovic Homework 6 This homework is due Octoer 11, 2016, t Noon. 1. Homework process nd study group Who else did you work

More information

Review of Gaussian Quadrature method

Review of Gaussian Quadrature method Review of Gussin Qudrture method Nsser M. Asi Spring 006 compiled on Sundy Decemer 1, 017 t 09:1 PM 1 The prolem To find numericl vlue for the integrl of rel vlued function of rel vrile over specific rnge

More information

Unit 4. Combinational Circuits

Unit 4. Combinational Circuits Unit 4. Comintionl Ciruits Digitl Eletroni Ciruits (Ciruitos Eletrónios Digitles) E.T.S.I. Informáti Universidd de Sevill 5/10/2012 Jorge Jun 2010, 2011, 2012 You re free to opy, distriute

More information

Formal languages, automata, and theory of computation

Formal languages, automata, and theory of computation Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm

More information

Chapter 5 Plan-Space Planning

Chapter 5 Plan-Space Planning Lecture slides for Automted Plnning: Theory nd Prctice Chpter 5 Pln-Spce Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Stte-Spce Plnning Motivtion g 1 1 g 4 4 s 0 g 5 5 g 2

More information

Chapter 9 Definite Integrals

Chapter 9 Definite Integrals Chpter 9 Definite Integrls In the previous chpter we found how to tke n ntiderivtive nd investigted the indefinite integrl. In this chpter the connection etween ntiderivtives nd definite integrls is estlished

More information

CH 9 INTRO TO EQUATIONS

CH 9 INTRO TO EQUATIONS CH 9 INTRO TO EQUATIONS INTRODUCTION I m thinking of number. If I dd 10 to the number, the result is 5. Wht number ws I thinking of? R emember this question from Chpter 1? Now we re redy to formlize the

More information

1 2 : 4 5. Why Digital Systems? Lesson 1: Introduction to Digital Logic Design. Numbering systems. Sample Problems 1 5 min. Lesson 1-b: Logic Gates

1 2 : 4 5. Why Digital Systems? Lesson 1: Introduction to Digital Logic Design. Numbering systems. Sample Problems 1 5 min. Lesson 1-b: Logic Gates Leon : Introduction to Digitl Logic Deign Computer ided Digitl Deign EE 39 meet Chvn Fll 29 Why Digitl Sytem? ccurte depending on numer of digit ued CD Muic i digitl Vinyl Record were nlog DVD Video nd

More information

MA123, Chapter 10: Formulas for integrals: integrals, antiderivatives, and the Fundamental Theorem of Calculus (pp.

MA123, Chapter 10: Formulas for integrals: integrals, antiderivatives, and the Fundamental Theorem of Calculus (pp. MA123, Chpter 1: Formuls for integrls: integrls, ntiderivtives, nd the Fundmentl Theorem of Clculus (pp. 27-233, Gootmn) Chpter Gols: Assignments: Understnd the sttement of the Fundmentl Theorem of Clculus.

More information

Section 6: Area, Volume, and Average Value

Section 6: Area, Volume, and Average Value Chpter The Integrl Applied Clculus Section 6: Are, Volume, nd Averge Vlue Are We hve lredy used integrls to find the re etween the grph of function nd the horizontl xis. Integrls cn lso e used to find

More information

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010 CS 311 Homework 3 due 16:30, Thursdy, 14 th Octoer 2010 Homework must e sumitted on pper, in clss. Question 1. [15 pts.; 5 pts. ech] Drw stte digrms for NFAs recognizing the following lnguges:. L = {w

More information

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz University of Southern Cliforni Computer Science Deprtment Compiler Design Fll Lexicl Anlysis Smple Exercises nd Solutions Prof. Pedro C. Diniz USC / Informtion Sciences Institute 4676 Admirlty Wy, Suite

More information

E 1 (n) = E 0 (n-1) E 0 (n) = E 0 (n-1)+e 0 (n-2) T(n -1)=2E 0 (n-2) + E 0 (n-3)

E 1 (n) = E 0 (n-1) E 0 (n) = E 0 (n-1)+e 0 (n-2) T(n -1)=2E 0 (n-2) + E 0 (n-3) cs3102: Theory of Computtion Clss 5: Non-Regulr PS1, Prolem 8 Menu Non-regulr lnguges Spring 2010 University of Virgini Dvid Evns PS1 Generl Comments Proofs re for mking convincing rguments, not for ofusction.

More information

The Regulated and Riemann Integrals

The Regulated and Riemann Integrals Chpter 1 The Regulted nd Riemnn Integrls 1.1 Introduction We will consider severl different pproches to defining the definite integrl f(x) dx of function f(x). These definitions will ll ssign the sme vlue

More information