Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, 2.2 -- Logic Functions.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Logical Systems Synthesis.
Chapter 2 Logic Circuits.
II - Combinational Logic © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Combinational logic Basic logic  Boolean algebra, proofs by re-writing,
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE 301 – Digital Electronics Minterm and Maxterm Expansions and Incompletely Specified Functions (Lecture #6) The slides included herein were taken from.
ECE 331 – Digital System Design
EECS Components and Design Techniques for Digital Systems Lec 05 – Boolean Logic 9/4-04 David Culler Electrical Engineering and Computer Sciences.
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
1 COMP541 Combinational Logic Montek Singh Jan 16, 2007.
EECC341 - Shaaban #1 Lec # 5 Winter Switching Algebra: Principle of Duality Any theorem or identity in switching algebra remains true if.
Gate Logic: Two Level Canonical Forms
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 4-1 Chapter #2: Two-Level Combinational Logic Section 2.3, Switches and Tools.
Canonical Forms and Logic Miniminization
بهينه سازي با نقشة کارنو Karnaugh Map. 2  Method of graphically representing the truth table that helps visualize adjacencies 2-variable K-map 3-variable.
Chapter 2: Boolean Algebra and Logic Functions
Chapter #2: Two-Level Combinational Logic
Chapter 2 Combinational Systems And / Or / Not. TRIAD PRINCIPLE: Combinational is about And / Or / Not combinations As well as equivalent functions. It.
Lecture 4 Logic gates and truth tables Implementing logic functions
1 Logic Gates Digital Computer Logic Kashif Bashir WWW:
1 COMBINATIONAL LOGIC One or more digital signal inputs One or more digital signal outputs Outputs are only functions of current input values (ideal) plus.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
ECE 331 – Digital System Design
Combinational Logic 1.
CSE 311 Foundations of Computing I Lecture 5, Boolean Logic and Predicates Autumn 2012 CSE 3111.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
LOGIC GATES & BOOLEAN ALGEBRA
Logic Functions: XOR, XNOR
Test Slide SAT MCAT GRE. CSE 370 Spring 2006 Introduction to Digital Design Lecture 5: Canonical Forms Last Lecture Logic Gates Different Implementations.
ENG241 Digital Design Week #2 Combinational Logic Circuits.
1 Boolean Algebra  Digital circuits Digital circuits  Boolean Algebra Boolean Algebra  Two-Valued Boolean Algebra Two-Valued Boolean Algebra  Boolean.
05 BA2 Page 1 ECEn/CS 224 Boolean Algebra – Part 2.
1 BOOLEAN ALGEBRA Basic mathematics for the study of logic design is Boolean Algebra Basic laws of Boolean Algebra will be implemented as switching devices.
Chap 2. Combinational Logic Circuits
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
1 COMP541 Combinational Logic - II Montek Singh Jan 18, 2012.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
Key Observation Adjacencies in the K-Map
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
©2010 Cengage Learning SLIDES FOR CHAPTER 4 APPLICATIONS OF BOOLEAN ALGEBRA MINTERM AND MAXTERM EXPANSIONS Click the mouse to move to the next page. Use.
UNIT 4 APPLICATIONS OF BOOLEAN ALGEBRA MINTERM AND MAXTERM EXPANSIONS Click the mouse to move to the next page. Use the ESC key to exit this chapter. This.
Boolean Algebra & Logic Gates
Lecture 4 Logistics Last lecture --- Boolean algebra Today’s lecture
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Chapter 2: Boolean Algebra and Logic Functions
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
CS 105 Digital Logic Design
Princess Sumaya University
ECE 331 – Digital System Design
CSE 311 Foundations of Computing I
Boolean Algebra.
Boolean Algebra.
Lecture 14: Boolean Algebra
Chapter 2 Boolean Algebra and Logic Gate
CSE 370 – Winter Combinational Logic - 1
CSE 370 – Winter 2002 – Logic minimization - 1
January 19 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05
February 7, 2002 John Wawrzynek
CSE 311 Foundations of Computing I
Chapter 2 Introduction to Logic Circuits
Spring Combinational Logic - 1
COMS 361 Computer Organization
Chapter #2: Two-Level Combinational Logic
Logic Circuits I Lecture 3.
CSE 370 – Winter Number syst.; Logic functions- 1
Presentation transcript:

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions and Gates

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-2 Two-Level Combinational Logic Gates and Truth Tables Switches Minimization Boolean Algebra Canonical Forms Waveforms Positive/Negative Logic

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-3 Logic Functions: Boolean Algebra Description Z = 1 if X and Y are both 1 GatesTruth Table X Y Z Y X Z NOT AND OR Description IfX = 0 thenX' = 1 IfX = 1 then X' = 0 Gates XX 0 1 X 1 0 Truth Table X Description Z = 1 ifX orY (or both) are 1 GatesTruth Table X Y Z X Y Z

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-4 Logic Functions: NAND, NOR, XOR, XNOR NAND NOR Description Z = 1 ifX is 0 orY is 0 GatesTruth Table X Y X Y Z Description Z= 1 if bothX andYare 0 GatesTruth Table X Y Z X Y Z z

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-5 Logic Functions: NAND, NOR Implementation Any Boolean expression can be implemented by NAND, NOR, NOT gates In fact, NOT is superfluous (NOT = NAND or NOR with both inputs tied together) X01X01 Y01Y01 X NOR Y 1 0 X01X01 Y01Y01 X NAND Y 1 0

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-6 Logic Functions: XOR, XNOR XOR: X or Y but not both ("inequality", "difference") XNOR: X and Y are the same ("equality", "coincidence") X  Y = XY’ + X’Y X  Y = X’Y’ + XY (a) XOR(b) XNOR Description Z = 1 ifX has a different value thanY Gates Truth Table X Y Z X Y Z Description Z = 1 ifX has the same value asY Gates Truth Table X Y Z X Y Z

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-7 Logic Functions: Boolean Algebra Switches X Y false true NOT AND OR Switches X True False X Switches XY X + Y False True

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-8 Logic Functions: NAND, NOR, XOR, XNOR NAND NOR Switches XY X Y False True Switches XY X+Y False True

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-9 Logic Functions: From Expressions to Gates More than one way to map an expression to gates E.g., Z = A' B' (C + D) = (A' (B' (C + D))) T1 T2 Literal: each appearance of a variable or its complement in an expression E.g., Z = A B' C + A' B + A' B C' + B' C 3 variables, 10 literals 2-input gates3-input gate

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Logic Functions: Rationale for Simplification Logic Minimization: reduce complexity of the gate level implementation reduce number of literals (gate inputs) reduce number of gates reduce number of levels of gates fewer inputs implies faster gates in some technologies fan-ins (number of gate inputs) are limited in some technologies fewer levels of gates implies reduced signal propagation delays minimum delay configuration typically requires more gates number of gates (or gate packages) influences manufacturing costs Traditional methods: reduce delay at expense of adding gates New methods: trade off between increased circuit delay and reduced gate count Traditional methods: reduce delay at expense of adding gates New methods: trade off between increased circuit delay and reduced gate count

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Logic Functions: Alternative Gate Realizations ABC’ + A’C + B’C Two-Level Realization (inverters don't count) ((AB)  C’) + ((AB)’  C) Multi-Level Realization Advantage: Reduced Gate Fan-ins (AB)  C Complex Gate: XOR Advantage: Fewest Gates TTL Package Counts: Z1 - three packages (1x 6-inverters, 1x 3-input AND, 1x 3-input OR) Z2 - three packages (1x 6-inverters, 1x 2-input AND, 1x 2-input OR) Z3 - two packages (1x 2-input AND, 1x 2-input XOR) Z = A’B’C + A’BC + AB’C + ABC’

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Logic Functions: Boolean Algebra Algebraic structure consisting of: set of elements B binary operations {+, } unary operation {'} such that the following axioms hold: 1. B contains at least two elements, a, b, such that a  b 2. Closure a,b in B, (i) a + b in B (ii) a b in B 3. Commutative Laws: a,b in B, (i) a + b = b + a (ii) a b = b a 4. Identities: 0, 1 in B (i) a + 0 = a (ii) a 1 = a 5. Distributive Laws: (i) a + (b c) = (a + b) (a + c) (ii) a (b + c) = a b + a c 6. Complement: (i) a + a' = 1 (ii) a a' = 0

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Laws of Boolean Algebra Duality: a dual of a Boolean expression is derived by replacing AND operations by ORs, OR operations by ANDs, constant 0s by 1s, and 1s by 0s (literals are left unchanged). Any statement that is true for an expression is also true for its dual! Useful Laws/Theorems of Boolean Algebra: Operations with 0 and 1: Idempotent Law: Involution Law: Laws of Complementarity: Commutative Law: 1. X + 0 = X 2. X + 1 = 1 1D. X 1 = X 2D. X 0 = 0 3. X + X = X3D. X X = X 4. (X')' = X 5. X + X' = 15D. X X' = 0 6. X + Y = Y + X 6D. X Y = Y X

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Laws of Boolean Algebra (cont) Distributive Laws: Simplification Theorems: DeMorgan's Law: Duality: Theorems for Multiplying and Factoring: Consensus Theorem: 8. X (Y+ Z) = (X Y) + (X Z) 8D. X + (Y Z) = (X + Y) (X + Z) 9. X Y + X Y' = X 10. X + X Y = X 11. (X + Y') Y = X Y 9D. (X + Y) (X + Y') = X 10D. X (X + Y) = X 11D. (X Y') + Y = X + Y 12. (X + Y + Z +...)' = X' Y' Z' {F(X1,X2,...,Xn,0,1,+,)}' = {F(X1',X2',...,Xn',1,0,,+)} 12D. (X Y Z...) ' = X' + Y' + Z' (X + Y + Z +...) = X Y Z {F(X1,X2,...,Xn,0,1,+,)} = {F(X1,X2,...,Xn,1,0,,+)} D D 14D. (X Y Z...) = X + Y + Z +... D 16. (X + Y) (X' + Z) = X Z + X' Y16D. X Y + X' Z = (X + Z) (X' + Y) 17. (X Y) + (Y Z) + (X' Z) = X Y + X' Z 17D. (X + Y) (Y + Z) (X' + Z) = (X + Y) (X' + Z) Associative Laws: 7. (X + Y) + Z = X + (Y + Z) = X + Y + Z 7D. (X Y) Z = X (Y Z) = X Y Z

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Laws of Boolean Algebra DeMorgan's Law (X + Y)' = X' Y' (X Y)' = X' + Y' NOR is equivalent to AND with inputs complemented NAND is equivalent to OR with inputs complemented DeMorgan's Law can be used to convert AND/OR expressions to OR/AND expressions DeMorgan's Law can be used to convert AND/OR expressions to OR/AND expressions X Y X Y X+Y XY X Y X Y X+Y

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Laws of Boolean Algebra Apply the laws and theorems to simplify Boolean equations Example: full adder's carry out function Cout = A' B Cin + A B' Cin + A B Cin' + A B Cin =

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Laws of Boolean Algebra Apply the laws and theorems to simplify Boolean equations Example: full adder's carry out function Cout = A' B Cin + A B' Cin + A B Cin' + A B Cin = A' B Cin + A B' Cin + A B Cin' + A B Cin + A B Cin = A' B Cin + A B Cin + A B' Cin + A B Cin' + A B Cin = (A' + A) B Cin + A B' Cin + A B Cin' + A B Cin = (1) B Cin + A B' Cin + A B Cin' + A B Cin = B Cin + A B' Cin + A B Cin' + A B Cin + A B Cin = B Cin + A B' Cin + A B Cin + A B Cin' + A B Cin = B Cin + A (B' + B) Cin + A B Cin' + A B Cin = B Cin + A (1) Cin + A B Cin' + A B Cin = B Cin + A Cin + A B (Cin' + Cin) = B Cin + A Cin + A B (1) = B Cin + A Cin + A B identity associative

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Laws of Boolean Algebra Proving theorems via axioms of Boolean Algebra: E.g., prove the theorem: X Y + X Y' = X E.g., prove the theorem: X + X Y = X

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Laws of Boolean Algebra Example: -- Apply DeMorgan’s Theorem Z = A' B' C + A' B C + A B' C + A B C' Z’ = Z' = (A + B + C') (A + B' + C') (A' + B + C') (A' + B' + C)

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: 2-Level Canonical Forms Truth table is the unique signature of a Boolean function Many alternative expressions (and gate realizations) may have the same truth table Canonical form: standard form for a Boolean expression provides a unique algebraic signature Sum of Products Form also known as disjunctive normal form, minterm expansion F = F' =

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Two Level Canonical Forms Sum of Products Shorthand Notation for Minterms of 3 Variables product term / minterm: ANDed product of literals in which each variable appears exactly once, in true or complemented form (but not both!) F in canonical form: F(A,B,C) =  m(3,4,5,6,7) = m3 + m4 + m5 + m6 + m7 = A' B C + A B' C' + A B' C + A B C' + A B C F’(A,B,C) =  m(0,1,2)

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No F = A' B C + A B' C' + A B' C + A B C' + A B C canonical form/minimal form F = F’ = 2-Level AND/OR Realization

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: 2 Level Canonical Forms Product of Sums / Conjunctive Normal Form / Maxterm Expansion Maxterm Shorthand Notation for a Function of Three Variables Maxterm: ORed sum of literals in which each variable appears exactly once in either true or complemented form, but not both! Maxterm form: Find truth table rows where F is 0 0 in input column implies true literal 1 in input column implies complemented literal F(A,B,C) =  M(0,1,2) = M0 M1 M2 = (A + B + C) (A + B + C') (A + B' + C) F’(A,B,C) =  M(3,4,5,6,7) = M3 M4 M5 M6 M7 = (A + B' + C') (A' + B + C) (A' + B + C') (A' + B' + C) (A' + B' + C')

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Incompletely Specified Functions n input functions have 2 possible input configurations for a given function, not all input configurations may be possible this fact can be exploited during circuit minimization! E.g., Binary Coded Decimal Digit Increment by 1 BCD digits encode the decimal digits in the bit patterns n 2 2 These input patterns should never be encountered in practice associated output values are "Don't Cares" Off-set of W On-set of W Don't care (DC) set of W

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Incompletely Specified Functions Don't Cares and Canonical Forms Z = m0 + m2 + m4 + m6 + m8 + d10 + d11 + d12 + d13 + d14 + d15 Z =  m(0, 2, 4, 6, 8) +  d(10, 11, 12, 13, 14, 15) Z = M1 M3 M5 M7 M9 D10 D11 D12 D13 D14 D15 Z=  M(1, 3, 5, 7,9) +  D(10, 11, 12, 13, 14, 15) Canonical Representations of the BCD Increment by 1 Function:

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Two-Level Canonical Forms Mapping Between Forms 1.Minterm to Maxterm conversion: rewrite minterm shorthand using maxterm shorthand replace minterm indices with the indices not already used E.g., F(A,B,C) =  m(3,4,5,6,7) =  M(0,1,2) 2.Maxterm to Minterm conversion: rewrite maxterm shorthand using minterm shorthand replace maxterm indices with the indices not already used E.g., F(A,B,C) =  M(0,1,2) =  m(3,4,5,6,7) 3.Minterm expansion of F to Minterm expansion of F': in minterm shorthand form, list the indices not already used in F E.g., F(A,B,C) =  m(3,4,5,6,7) F'(A,B,C) =  m(0,1,2) =  M(0,1,2) =  M(3,4,5,6,7) 4. Minterm expansion of F to Maxterm expansion of F': rewrite in Maxterm form, using the same indices as F E.g., F(A,B,C) =  m(3,4,5,6,7) F'(A,B,C) =  M(3,4,5,6,7) =  M(0,1,2) =  m(0,1,2)

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Two-Level Canonical Forms Four Alternative Implementations of F: Canonical Sum of Products F1 = A’BC + AB’C’ + AB’C + ABC’ + ABC  m(3,4,5,6,7) Minimized Sum of Products F2 = BC + A Canonical Products of Sums F3 = (A+B+C)  (A+B+C’)  (A+B’+C)  (0,1,2) Minimized Products of Sums F4 = (A+B)  (A+C) A A’ B B’ C C’

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Two-Level Canonical Forms Waveform Verification of the Three Alternatives Eight Unique Combinations of Three Inputs Except for timing glitches, output waveforms of the three implementations are essentially identical F4F4

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Positive vs. Negative Logic Normal Convention: Postive Logic/Active High Low Voltage = 0; High Voltage = 1 Alternative Convention sometimes used: Negative Logic/Active Low Behavior in terms of Electrical Levels Two Alternative Interpretations Positive Logic AND Negative Logic OR Dual Operations Negative LogicPositive LogicVoltage Truth Table F low high F F A low high B low high low high B A A B F

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Gate Logic: Positive vs. Negative Logic Conversion from Positive to Negative Logic Positive Logic NOR: Negative Logic NAND: Dual operations: AND becomes OR, OR becomes AND Complements remain unchanged Negative LogicPositive LogicVoltage Truth Table F high low F F A high B low high low high B A A B F

Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No Homework Assignment HW #3 -- Chapter 2: Sections 2.1 and 2.2