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

Similar documents
Chapter 1: Boolean Logic

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

Boolean Logic. Building a Modern Computer From First Principles.

Boolean algebra.

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

IST 4 Information and Logic

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation

Overview of Today s Lecture:

IST 4 Information and Logic

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

Introduction to Electrical & Electronic Engineering ENGG1203

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

Fast Boolean Algebra

FABER Formal Languages, Automata and Models of Computation

Convert the NFA into DFA

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

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

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

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

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

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

IST 4 Information and Logic

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

Math 154B Elementary Algebra-2 nd Half Spring 2015

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

CS 330 Formal Methods and Models

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

Nondeterminism and Nodeterministic Automata

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

Lecture 3: Equivalence Relations

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

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

6.004 Computation Structures Spring 2009

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

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

Digital Control of Electric Drives

CS 314 Principles of Programming Languages

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.

Designing Information Devices and Systems I Spring 2018 Homework 7

Boolean Algebra. Boolean Algebra

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

COMPUTER SCIENCE TRIPOS

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

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

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

The practical version

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

Section 6.1 INTRO to LAPLACE TRANSFORMS

Fault Modeling. EE5375 ADD II Prof. MacDonald

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

First Midterm Examination

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

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

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

CS 330 Formal Methods and Models

Parse trees, ambiguity, and Chomsky normal form

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

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

Coalgebra, Lecture 15: Equations for Deterministic Automata

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

CISC 4090 Theory of Computation

CS375: Logic and Theory of Computing

CHAPTER 1 PROGRAM OF MATRICES

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

Chapter 2 Finite Automata

Control with binary code. William Sandqvist

Homework 3 Solutions

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

CS 275 Automata and Formal Language Theory

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

Introduction to Algebra - Part 2

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

First Midterm Examination

Advanced Algebra & Trigonometry Midterm Review Packet

Let's start with an example:

Formal Language and Automata Theory (CS21004)

Lecture 08: Feb. 08, 2019

Good Review book ( ) ( ) ( )

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

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

Some Theory of Computation Exercises Week 1

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?

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

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.

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

Normal Forms for Context-free Grammars

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

Review of Gaussian Quadrature method

Unit 4. Combinational Circuits

Formal languages, automata, and theory of computation

Chapter 5 Plan-Space Planning

Chapter 9 Definite Integrals

CH 9 INTRO TO EQUATIONS

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

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

Section 6: Area, Volume, and Average Value

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

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

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)

The Regulated and Riemann Integrals

Transcription:

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

Course theme nd structure Humn Thought Astrct design Chpters 9, 12 H.L. Lnguge & Operting Sys. Compiler Chpters 10-11 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

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 10-11 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

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 = 511 - 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

The ig picture Humn Thought Astrct design Chpters 9, 12 H.L. Lnguge & Operting Sys. Compiler Chpters 10-11 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 10-11 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

Compiltion > Intermedite code Source code (x+width)>511 prsing x + 511 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...... 450 75 sp s2 75 450 s4 s5 s9 push 511 gt if-goto L1 goto L2 // s4 // s5 // s6 // s7 sp 525 511 sp 1 sp 511 450 L1: push 511 push width su pop x L2:... // s8 // s9 // s10 // s11 sp s10 61 memory (fter)... width x...... 450 61 Course Overview 12 Elements of Computing Systems

The ig picture Humn Thought Astrct design Chpters 9, 12 H.L. Lnguge & Operting Sys. Compiler Chpters 10-11 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 511 @511 D=A // D=511 @SP A=M M=D // *SP=D @SP @SP M=M+1 // SP++ Assemler Executle 0000000000000000 1110110010001000... Course Overview 14 Elements of Computing Systems

The ig picture Humn Thought Astrct design Chpters 9, 12 H.L. Lnguge & Operting Sys. Compiler Chpters 10-11 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 0000000000000000 1111110111001000 @0 M=M-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 1 1 0 0 1 0 0 0 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

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 10-11 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

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 0 0 0 0 1 1 1 0 1 1 1 0 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

The tour ends Interfce Implementtion (CMOS) Nnd 0 0 1 0 1 1 1 0 1 1 1 0 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

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

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) 0 1 1 0 x y Or(x,y) Or(x,y) 0 0 0 0 1 1 1 0 1 1 1 1 x y And(x,y) And(x,y) 0 0 0 0 1 0 1 0 0 1 1 1 x y Nnd(x,x) Nnd(x,x) 0 0 1 0 1 1 1 0 1 1 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 0 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

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, 1815-1864 ( A Clculus of Logic ) Or(,) =... Xor(,) =... Etc. Course Overview 28 Elements of Computing Systems

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 0 0 0 0 1 0 1 0 0 1 1 1 OR gte 0 0 0 0 1 1 1 0 1 1 1 1 power supply power supply c 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 c AND (,,c) c AND AND Physicl reliztions of logic gtes re irrelevnt to computer science. Course Overview 30 Elements of Computing Systems

Gte Logic Interfce Xor Clude Shnnon, 1916-2001 0 0 0 0 1 1 1 0 1 1 1 0 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(,) 0 0 1 0 1 1 1 0 1 1 1 0 Not() =... true =... And(,) =... Or(,) =... Mux(s,,) =... Etc. - 12 gtes ltogether. Course Overview 32 Elements of Computing Systems

Building n And gte And And.cmp 0 0 0 0 1 0 1 0 0 1 1 1 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

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

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

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

IDC Herzliy Shimon Schocken Boolen Arithmetic Shimon Schocken Course Overview 41 Elements of Computing Systems Counting systems quntity deciml inry 3-it register 0 0 000 1 1 001 2 10 010 3 11 011 4 100 100 5 101 101 6 110 110 7 111 111 8 1000 overflow 9 1001 overflow 10 1010 overflow Course Overview 42 Elements of Computing Systems

Rtionle (9038) ten = 9 10 3 + 0 10 2 1 + 3 10 + 8 10 0 = 9038 (10011) two = 1 2 4 + 0 2 3 + 0 2 2 + 1 2 1 + 1 2 0 = 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: 0 0 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 no overflow 1 1 1 1 1 0 1 1 0 1 1 1 1 0 0 1 0 overflow Algorithm: exctly the sme s in deciml ddition Overflow (MSB crry) hs to e delt with. Course Overview 44 Elements of Computing Systems

Representing negtive numers (4-it system) 0 0000 1 0001 1111-1 2 0010 1110-2 3 0011 1101-3 4 0100 1100-4 5 0101 1011-5 6 0110 1010-6 7 0111 1001-7 1000-8 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) = 0 0 1 0 + 1 0 1 1 1 1 0 1 = -3 Course Overview 45 Elements of Computing Systems Building n Adder chip 16 16 16-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

Hlf dder (designed to dd 2 its) crry sum 0 0 0 0 0 0 0 1 0 1 0 1 hlf dder sum crry 0 1 1 0 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 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 c full dder sum crry 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 Implementtion: cn e sed on hlf-dder gtes. Course Overview 48 Elements of Computing Systems

n-it Adder 16 16 16-it dder 16... 1 0 1 1 0 0 1 0 + 1 1 0 1 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 16 16 16-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

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

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