Basics of Logic Design: Boolean Algebra, Logic Gates. Administrative

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

One Minute To Learn Programming: Finite Automata

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

Homework 3 Solutions

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

Understanding Logic Design

MATH 150 HOMEWORK 4 SOLUTIONS

Algebra Review. How well do you remember your algebra?

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

Regular Sets and Expressions

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

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

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

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

Operations with Polynomials

Reasoning to Solve Equations and Inequalities

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

Factoring Polynomials

Integration by Substitution

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

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

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES

Experiment 6: Friction

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

Solution to Problem Set 1

Math 135 Circles and Completing the Square Examples

Small Business Cloud Services

How To Network A Smll Business

Small Business Networking

0.1 Basic Set Theory and Interval Notation

Binary Representation of Numbers Autar Kaw

CS 316: Gates and Logic

5 a LAN 6 a gateway 7 a modem

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

EQUATIONS OF LINES AND PLANES

Small Business Networking

Rotating DC Motors Part II

Vectors Recap of vectors

Lecture 3 Gaussian Probability Distribution

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

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

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

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

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

Lectures 8 and 9 1 Rectangular waveguides

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

Small Business Networking

Unit 3 Boolean Algebra (Continued)

5.6 POSITIVE INTEGRAL EXPONENTS

Geometry 7-1 Geometric Mean and the Pythagorean Theorem

Small Business Networking

Section 5-4 Trigonometric Functions

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

2 DIODE CLIPPING and CLAMPING CIRCUITS

RIGHT TRIANGLES AND THE PYTHAGOREAN TRIPLETS

Unit 6: Exponents and Radicals

. 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

Review guide for the final exam in Math 233

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

GENERAL APPLICATION FOR FARM CLASSIFICATION

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

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

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

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

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

Lecture 5. Inner Product

Graphs on Logarithmic and Semilogarithmic Paper

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

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

Hillsborough Township Public Schools Mathematics Department Computer Programming 1

Welch Allyn CardioPerfect Workstation Installation Guide

How To Set Up A Network For Your Business

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

PROGRAMOWANIE STRUKTUR CYFROWYCH

4.11 Inner Product Spaces

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

Object Semantics Lecture 2

Repeated multiplication is represented using exponential notation, for example:

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

Brillouin Zones. Physics 3P41 Chris Wiebe

Quick Reference Guide: One-time Account Update

Math 314, Homework Assignment Prove that two nonvertical lines are perpendicular if and only if the product of their slopes is 1.

Sistemas Digitais I LESI - 2º ano

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

1.2 The Integers and Rational Numbers

SINCLAIR COMMUNITY COLLEGE DAYTON, OHIO DEPARTMENT SYLLABUS FOR COURSE IN MAT COLLEGE ALGEBRA (4 SEMESTER HOURS)

SPECIAL PRODUCTS AND FACTORIZATION

STRM Log Manager Installation Guide

CSE140: Components and Design Techniques for Digital Systems

DlNBVRGH + Sickness Absence Monitoring Report. Executive of the Council. Purpose of report

Quick Guide to Lisp Implementation

Chapter. Contents: A Constructing decimal numbers

Engineer-to-Engineer Note

3 The Utility Maximization Problem

Transcription:

Bsics of Logic Design: Boolen Alger, Logic Gtes Computer Science 104 Administrtive Homework #3 Due Sundy Midterm I Mondy in clss, closed ook, closed notes Ø Will provide IA32 instruction set hndout Ø Lst spring s midterm on lckord Ø Alex will schedule review session for Mondy evening Do we need one more recursion exmple? 2

Tody s Lecture Outline Building the uilding locks Logic Design Ø Truth tles, Boolen functions, Gtes nd Circuits Reding 4.2 of text, ut we re going into more detil thn the text ny other online resource you cn find 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 movl or je? 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 Functions nd Expressions F(A, B, C) = (A * B) + (~A * C) A B C F 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 1 9 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 Function Simplifiction f1 = ~*~*c + ~**c + *~*c + **c = ~*(~*c +*c) +*(~*c+*c) = ~*c*(~+) ~*c*(~+) = ~*c + *c = c*(~+) = c f2 = ~*~*~c + ~*~*c + **~c + **c = ~*(~*~c + ~*c) + *(*~c + *c) = ~*~(c+~c) * **(~c+c) = ~*~ + * 12

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-ofproduct 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

Applying the Theory Lots of good 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 cores) Totl: 290 Million Trnsistors Corei7 (4 cores) Totl: 731 Million Trnsistors Insert Tngent out wht trnsistor is 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 Q 3 I 1 I 0 Q 0 Q 1 Q 2 Q 3 Q 2 0 0 1 0 0 0 0 1 0 1 0 0 Q 1 1 0 0 0 1 0 1 1 0 0 0 1 Q 0 I 1 I 0 23 Circuit Exmple: 2x1 MUX Multiplexor (MUX) selects from one of mny inputs 1 0 y MUX(A, B, S) = (A * S) + (B * ~S) s B Gte 1 Gte 3 Y = (A * S) + (B * ~S) A Gte 2 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 4.2 of text 27 DeMorgn s Lws ~(A+B) = ~A * ~B ~(A*B) = ~A + ~B Exmple: ~C*~A*B + ~C*A*~B + C*A*B + C*~A*~B Use only XOR to represent this function 28