Basics of Logic Design: Boolean Algebra, Logic Gates. Today s Lecture

Similar documents
Learning Outcomes. Computer Systems - Architecture Lecture 4 - Boolean Logic. What is Logic? Boolean Logic 10/28/2010

CS99S Laboratory 2 Preparation Copyright W. J. Dally 2001 October 1, 2001

Words Symbols Diagram. abcde. a + b + c + d + e

Lec 2: Gates and Logic

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Friday 16 th May Time: 14:00 16:00

One Minute To Learn Programming: Finite Automata

Understanding Logic Design

Example A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding

Example 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers.

Homework 3 Solutions

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY

MATH 150 HOMEWORK 4 SOLUTIONS

Algebra Review. How well do you remember your algebra?

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( )

Use Geometry Expressions to create a more complex locus of points. Find evidence for equivalence using Geometry Expressions.

Reasoning to Solve Equations and Inequalities

Regular Sets and Expressions

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES

Or more simply put, when adding or subtracting quantities, their uncertainties add.

Solution to Problem Set 1

Operations with Polynomials

Factoring Polynomials

Lecture 3 Gaussian Probability Distribution

Experiment 6: Friction

Lectures 8 and 9 1 Rectangular waveguides

Small Business Cloud Services

Firm Objectives. The Theory of the Firm II. Cost Minimization Mathematical Approach. First order conditions. Cost Minimization Graphical Approach

How To Network A Smll Business

Small Business Networking

Rotating DC Motors Part II

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

1.00/1.001 Introduction to Computers and Engineering Problem Solving Fall Final Exam

Vectors Recap of vectors

DATABASDESIGN FÖR INGENJÖRER F

5 a LAN 6 a gateway 7 a modem

and thus, they are similar. If k = 3 then the Jordan form of both matrices is

Binary Representation of Numbers Autar Kaw

Small Business Networking

Virtual Machine. Part II: Program Control. Building a Modern Computer From First Principles.

Integration by Substitution

0.1 Basic Set Theory and Interval Notation

1 Boolean Logic. Such simple things, And we make of them something so complex it defeats us, Almost. John Ashbery (b. 1927), American poet

A.7.1 Trigonometric interpretation of dot product A.7.2 Geometric interpretation of dot product

CS 316: Gates and Logic

Geometry 7-1 Geometric Mean and the Pythagorean Theorem

5.2. LINE INTEGRALS 265. Let us quickly review the kind of integrals we have studied so far before we introduce a new one.

Module 2. Analysis of Statically Indeterminate Structures by the Matrix Force Method. Version 2 CE IIT, Kharagpur

Appendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered:

Graphs on Logarithmic and Semilogarithmic Paper

Small Business Networking

Small Business Networking

How fast can we sort? Sorting. Decision-tree model. Decision-tree for insertion sort Sort a 1, a 2, a 3. CS Spring 2009

Math 135 Circles and Completing the Square Examples

2 DIODE CLIPPING and CLAMPING CIRCUITS

RIGHT TRIANGLES AND THE PYTHAGOREAN TRIPLETS

Lecture 5. Inner Product

The remaining two sides of the right triangle are called the legs of the right triangle.

Hillsborough Township Public Schools Mathematics Department Computer Programming 1

MA Lesson 16 Notes Summer 2016 Properties of Logarithms. Remember: A logarithm is an exponent! It behaves like an exponent!

Karnaugh Maps & Combinational Logic Design. ECE 152A Winter 2012

Bayesian Updating with Continuous Priors Class 13, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

Unit 3 Boolean Algebra (Continued)

5.6 POSITIVE INTEGRAL EXPONENTS

Unit 6: Exponents and Radicals

EQUATIONS OF LINES AND PLANES

Sistemas Digitais I LESI - 2º ano

Outline of the Lecture. Software Testing. Unit & Integration Testing. Components. Lecture Notes 3 (of 4)

APPLICATION NOTE Revision 3.0 MTD/PS-0534 August 13, 2008 KODAK IMAGE SENDORS COLOR CORRECTION FOR IMAGE SENSORS

P.3 Polynomials and Factoring. P.3 an 1. Polynomial STUDY TIP. Example 1 Writing Polynomials in Standard Form. What you should learn

Review guide for the final exam in Math 233

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

Gates, Circuits, and Boolean Algebra

4.11 Inner Product Spaces

How To Set Up A Network For Your Business

Section 5-4 Trigonometric Functions

. At first sight a! b seems an unwieldy formula but use of the following mnemonic will possibly help. a 1 a 2 a 3 a 1 a 2

Let s put together a Manual Processor

CH3 Boolean Algebra (cont d)

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100

9.3. The Scalar Product. Introduction. Prerequisites. Learning Outcomes

Brillouin Zones. Physics 3P41 Chris Wiebe

Repeated multiplication is represented using exponential notation, for example:

Equivalence Checking. Sean Weaver

PROGRAMOWANIE STRUKTUR CYFROWYCH

FUNCTIONS AND EQUATIONS. xεs. The simplest way to represent a set is by listing its members. We use the notation

Welch Allyn CardioPerfect Workstation Installation Guide

STRM Log Manager Installation Guide

CSE140: Components and Design Techniques for Digital Systems

SPECIAL PRODUCTS AND FACTORIZATION

Start Here. IMPORTANT: To ensure that the software is installed correctly, do not connect the USB cable until step 17. Remove tape and cardboard

Radius of the Earth - Radii Used in Geodesy James R. Clynch February 2006

Object Semantics Lecture 2

Chapter. Contents: A Constructing decimal numbers

NQF Level: 2 US No: 7480

Angles 2.1. Exercise Find the size of the lettered angles. Give reasons for your answers. a) b) c) Example

Multiplication and Division - Left to Right. Addition and Subtraction - Left to Right.

1. Find the zeros Find roots. Set function = 0, factor or use quadratic equation if quadratic, graph to find zeros on calculator

exclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576

Transcription:

Bsics of Logic Design: Boolen Alger, Logic Gtes Computer Science 104 Tody s Lecture Projects (groups of 2 or 3) Outline Building the uilding locks Logic Design Truth tles, Boolen functions, Gtes nd Circuits Reding Appendix C (link off course we pge/documents) http://rch.cs.duke.edu/locl/cod4ed/resources/appendix/appendix-c-p374493.pdf 2

The Big Picture The Five Clssic Components of Computer Processor/CPU Control Dtpth Memory Input Output 3 Wht We ve Done, Where We re Going Top Down Appliction CPU Compiler Memory Operting System Digitl Design Circuit Design Firmwre I/O system Softwre Interfce Between HW nd SW Instruction Set Architecture, Memory, I/O Hrdwre Bottom UP to CPU 4

Digitl Design Logic Design, Switching Circuits, Digitl Logic Recll: Everything is uilt from trnsistors A trnsistor is switch It is either on or off On or off cn represent True or Flse Given unch of its (0 or 1) Is this instruction lw or eq? Wht register do I red? How do I dd two numers? Need method to reson out complex expressions 5 Boolen Alger Boolen functions hve rguments tht tke two vlues ({T,F} or {1,0}) nd they return single or set of ({T,F} or {1,0}) vlue(s). Boolen functions cn lwys e represented y tle clled Truth Tle Exmple: F: {0,1} 3 -> {0,1} 2 c f 1 f 2 0 0 0 0 1 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 1 1 0 0 1 1 1 1 1 1 6

Boolen Functions Exmple Boolen Functions: NOT, AND, OR, XOR,... NOT() 0 1 1 0 AND(,) 0 0 0 0 1 0 1 0 0 1 1 1 OR(,) 0 0 0 0 1 1 1 0 1 1 1 1 XOR(,) 0 0 0 0 1 1 1 0 1 1 1 0 XNOR(,) 0 0 1 0 1 0 1 0 0 1 1 1 NOR(,) 0 0 1 0 1 0 1 0 0 1 1 0 7 Boolen Functions nd Expressions Boolen lger nottion: Use * for AND, + for OR, ~ for NOT. NOT is lso written s A nd A Using the ove nottion we cn write Boolen expressions for functions F(A, B, C) = (A * B) + (~A * C) We cn evlute the Boolen expression with ll possile rgument vlues to construct truth tle. Wht is truth tle for F? 8

Boolen Function Simplifiction Boolen expressions cn e simplified y using the following rules (itwise logicl): A*A = A A* 0 = 0 A*1 = A A*~A = 0 A+A = A A+0 = A A+1 = 1 A+~A = 1 A*B = B*A A*(B+C) = (B+C)*A = A*B + A*C 10 Boolen Function Simplifiction c f 1 f 2 0 0 0 0 1 0 0 1 1 1 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 0 1 1 0 0 1 1 1 1 1 1 f 1 = ~*~*c + ~**c + *~*c + **c f 2 = ~*~*~c + ~*~*c + **~c + **c Simplify these functions... 11

Boolen Functions nd Expressions The Fundmentl Theorem of Boolen Alger: Every Boolen function cn e written in disjunctive norml form s n OR of ANDs (Sum-of products) of it s rguments or their complements. Proof: Write the truth tle, construct sum-of -product from the tle. XNOR(,) 0 0 1 0 1 0 1 0 0 1 1 1 XNOR = (~ * ~) + ( * ) 13 Boolen Functions nd Expressions Exmple-2: c f 1 f 2 0 0 0 0 1 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 1 1 0 0 1 1 1 1 1 1 f 1 = ~*~*c + ~**~c + *~*~c + **c f 2 = ~*~*~c + ~*~*c + **~c + **c 14

Lots of good theory Applying the Theory Cn reson out complex oolen expressions Now we hve to mke it rel 15 Boolen Gtes Gtes re electronic devices tht implement simple Boolen functions Exmples AND(,) OR(,) NOT() XOR(,) NAND(,) NOR(,) XNOR(,) 16

Relity Check Bsic 1 or 2 Input Boolen Gte 1-4 Trnsistors Pentium III Processor Core 9.5 Million Trnsistors Totl: 28 Million Trnsistors Pentium 4 Totl: 42 Million Trnsistors Core2 Duo (two processors) Totl: 290 Million Trnsistors Core2 Duo Extreme (4 processors, 8MB cche) Totl: 590 Million Trnsistors 17 Boolen Functions, Gtes nd Circuits Circuits re mde from network of gtes. (function compositions). XOR(,) F = ~* + ~* XOR(,) 0 0 0 0 1 1 1 0 1 1 1 0 F 18

Digitl Design Exmples Input: 2 its representing n unsigned numer (n) Output: n 2 s 4-it unsigned inry numer Input: 2 its representing n unsigned numer (n) Output: 3-n s unsigned inry numer 19 Design Exmple Consider mchine with 4 registers Given 2-it input (register specifier, I 1, I 0 ) Wnt one of 4 output its (O 3 -O 0 ) to e 1 E.g., llows single register to e ccessed Wht is the circuit for this? 20

More Design Exmples X is 3-it quntity 1. Write logic function tht is true if nd only if X contins t lest two 1s. 2. Implement the logic function from prolem 1. using only AND, OR nd NOT gtes. (Note there re no constrints on the numer of gte inputs.) By implement, I men drw the circuit digrm. 3. Write logic function tht is true if nd only if X, when interpreted s n unsigned inry numer, is greter thn the numer 4. 4. Implement the logic function from prolem 3. using only AND, OR nd NOT gtes. (Note there re no constrints on the numer of gte inputs.) 21 Prity Exmple The prity code of inry word counts the numer of ones in word. If there re n even numer of ones the prity code is 0, if there re n odd numer of ones the prity code is 1. For exmple, the prity of 0101 is 0, nd the prity of 1101 is 1. Construct the truth tle for function tht computes the prity of four-it word. Implement this function using AND, OR nd NOT gtes. (Note there re no constrints on the numer of gte inputs.) 22

Circuit Exmple: Decoder I 1 I 0 Q 0 Q 1 Q 2 Q 3 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 1 23 Circuit Exmple: 2x1 MUX Multiplexor (MUX) selects from one of mny inputs y MUX(A, B, S) = (A * S) + (B * ~S) s B A Gte 1 Gte 2 Gte 3 Y = (A * S) + (B * ~S) S 24

Exmple 4x1 MUX 3 c y c 2 1 y d d 0 2 s 0 s 1 S 25 Arithmetic nd Logicl Opertions in ISA Wht opertions re there? How do we implement them? Consider 1-it Adder 26

Summry Boolen Alger & functions Logic gtes (AND, OR, NOT, etc) Multiplexors Reding Appendix C 27