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

Similar documents
Chapter 1: Boolean Logic

Boolean Logic. Building a Modern Computer From First Principles.

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

Boolean algebra.

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

Overview of Today s Lecture:

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

Introduction to Electrical & Electronic Engineering ENGG1203

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation

IST 4 Information and Logic

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

Boolean Algebra. Boolean Algebra

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

ECE223. R eouven Elbaz Office room: DC3576

IST 4 Information and Logic

IST 4 Information and Logic

Engr354: Digital Logic Circuits

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

CS 314 Principles of Programming Languages

Fast Boolean Algebra

Section 6.1 INTRO to LAPLACE TRANSFORMS

BİL 354 Veritabanı Sistemleri. Relational Algebra (İlişkisel Cebir)

Let's start with an example:

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

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

Fachgebiet Rechnersysteme1. 1. Boolean Algebra. 1. Boolean Algebra. Verification Technology. Content. 1.1 Boolean algebra basics (recap)

Control with binary code. William Sandqvist

Chapter 3. Vector Spaces

Convert the NFA into DFA

Designing finite automata II

Coalgebra, Lecture 15: Equations for Deterministic Automata

Lexical Analysis Finite Automate

Digital Control of Electric Drives

Finite Automata-cont d

Math 154B Elementary Algebra-2 nd Half Spring 2015

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

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

ICTP Latin-American Advanced Course on FPGADesign for Scientific Instrumentation. 19 November - 17 December, 2012.

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

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

Fault Modeling. EE5375 ADD II Prof. MacDonald

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

CS 275 Automata and Formal Language Theory

Learning Goals. Relational Query Languages. Formal Relational Query Languages. Formal Query Languages: Relational Algebra and Relational Calculus

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

Lecture 11 Binary Decision Diagrams (BDDs)

Lecture 09: Myhill-Nerode Theorem

Boolean Algebra. Boolean Algebras

MATH1131 Mathematics 1A Algebra

CS 330 Formal Methods and Models

SIMPLIFICATION OF BOOLEAN ALGEBRA. Presented By: Ms. Poonam Anand

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

The area under the graph of f and above the x-axis between a and b is denoted by. f(x) dx. π O

4.1. Probability Density Functions

CHAPTER 9 MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

Software Engineering using Formal Methods

Good Review book ( ) ( ) ( )

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

Bases for Vector Spaces

Chapter 6 Continuous Random Variables and Distributions

CMSC 330: Organization of Programming Languages

Exploring parametric representation with the TI-84 Plus CE graphing calculator

6.004 Computation Structures Spring 2009

Unit 4. Combinational Circuits

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

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

CHAPTER 3 LOGIC GATES & BOOLEAN ALGEBRA

Fundamentals of Computer Science

Chapter 9 Definite Integrals

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Genetic Programming. Outline. Evolutionary Strategies. Evolutionary strategies Genetic programming Summary

Finite Field Arithmetic and Implementations. Xinmiao Zhang Case Western Reserve University

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Network Analysis and Synthesis. Chapter 5 Two port networks

Concepts of Concurrent Computation Spring 2015 Lecture 9: Petri Nets

Homework 3 Solutions

The Evaluation Theorem

Operations Algorithms on Quantum Computer

Note 12. Introduction to Digital Control Systems

Introduction to Electronic Circuits. DC Circuit Analysis: Transient Response of RC Circuits

Bob Brown Math 251 Calculus 1 Chapter 5, Section 4 1 CCBC Dundalk

Golden Section Search Method - Theory

NFAs continued, Closure Properties of Regular Languages

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

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

Homework Solution - Set 5 Due: Friday 10/03/08

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

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

CS375: Logic and Theory of Computing

Thoery of Automata CS402

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings...

FABER Formal Languages, Automata and Models of Computation

1 Nondeterministic Finite Automata

Chapter 8.2: The Integral

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

Minimal DFA. minimal DFA for L starting from any other

Similarity and Congruence

Lecture 3: Curves in Calculus. Table of contents

Chapter 4 State-Space Planning

Transcription:

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 ccompny the textook The Elements of Computing Systems y Nom Nisn & Shimon Schocken, MIT Press, 2005. We provide oth PPT nd PDF versions. The ook we site, www.idc.c.il/tecs, fetures 13 such presenttions, one for ech ook chpter. Ech presenttion is designed to support 3 hours of clssroom or self-study instruction. You re welcome to use or edit this presenttion s you see fit for instructionl nd noncommercil purposes. If you use our mterils, we will pprecite it if you will include in them reference to the ook s we site. If you hve ny questions or comments, you cn rech us t tecs.t@gmil.com Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 1

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,y) Nnd(x,y) 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. Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 2

All Boolen functions of 2 vriles Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 3

Boolen lger Given: Nnd(,), flse We cn uild: Not() = Nnd(,) true = Not(flse) And(,) = Not(Nnd(,)) George Boole, 1815-1864 ( A Clculus of Logic ) Or(,) = Not(And(Not(),Not())) Xor(,) = Or(And(,Not()),And(Not(),))) Etc. Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 4

Gte logic Gte logic gte rchitecture designed to implement Boolen function Elementry gtes: Composite gtes: Importnt distinction: Interfce (wht) VS implementtion (how). Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 5

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(And(,Not()),And(Not(),))) Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 6

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 From computer science perspective, physicl reliztions of logic gtes re irrelevnt. Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 7

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(,,sel) =... Etc. - 12 gtes ltogether. Why these prticulr 12 gtes? Since They re commonly used gtes They provide ll the sic uilding locks needed to uild our computer. Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 8

Multiplexer 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 Proposed Implementtion: sed on Not, And, Or gtes. Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 9

Exmple: 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; Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 10

Building n And gte Interfce: And(,) = 1 exctly when ==1 And And.hdl CHIP CHIP And And { IN IN,, ; ; OUT OUT ; ; // // implementtion missing missing } Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 11

Building n And gte Implementtion: And(,) = Not(Nnd(,)) And.hdl CHIP CHIP And And { IN IN,, ; ; OUT OUT ; ; // // implementtion missing missing } Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 12

Building n And gte Implementtion: And(,) = Not(Nnd(,)) Nnd x in Not And.hdl CHIP CHIP And And { IN IN,, ; ; OUT OUT ; ; // // implementtion missing missing } Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 13

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, = ) ) } Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 14

Hrdwre simultor (demonstrting Xor gte construction) HDL progrm test script Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 15

Hrdwre simultor HDL progrm Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 16

Hrdwre simultor HDL progrm put file Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 17

Project mterils Project 1 on the course we site And.hdl, And.tst, And.cmp files Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 18

Project 1 tips Red Chpter 1 of the ook Downlod the ook s softwre suite Go through the hrdwre simultor tutoril Do Project 0 (optionl) You re in usiness. Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 19

End notes: Cnonicl representtion Truth tle of the function s (, m, w) = ( m+ w) Cnonicl form: s (, m, w) = m w+ mw+ mw Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 20

End notes: Cnonicl representtion (cont.) s (, m, w) = ( m+ w) m w nd or s s (, m, w) = m w+ mw+ mw m w nd nd or s nd Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 21

End notes: 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) Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 22

Perspective 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 stndrd PLD consisting of Nnd gtes only Mss production c nd Universl uilding locks, unique topology. or f(,,c) Gtes, neurons, toms, nd Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 23

End note: universl uilding locks, unique topology nd c. or f(,,c) nd Elements of Computing Systems, Nisn & Schocken, MIT Press, www.idc.c.il/tecs, Chpter 1: Boolen Logic slide 24