1 CK Cheng CSE Dept. UC San Diego CSE 140, Lecture 2 Combinational Logic.

Slides:



Advertisements
Similar presentations
Chapter 2 Logic Circuits.
Advertisements

1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
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
CS 140 Lecture 2 Combinational Logic CK Cheng 4/04/02.
1 CS 140 Lecture 3 Combinational Logic Professor CK Cheng CSE Dept. UC San Diego.
1 COMP541 Combinational Logic Montek Singh Jan 16, 2007.
1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
CK Cheng Tuesday 10/2/02 CS 140 Lecture 2. Part I. Combinational Logic I) Specification –a. Language –b. Truth Table –c. Boolean Algebra –d. Incompletely.
Lecture 1: Introduction to Digital Logic Design CK Cheng Thursday 9/26/02.
1 CSE20 Lecture 16 Boolean Algebra: Applications Professor CK Cheng CSE Dept. UC San Diego 1.
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
Lecture 1: Introduction to Digital Logic Design CK Cheng Tuesday 4/1/02.
1 CS 140 Lecture 3 Combinational Logic Professor CK Cheng CSE Dept. UC San Diego.
1 CSE 20: Lecture 7 Boolean Algebra CK Cheng 4/21/2011.
Boolean Algebra. Introduction 1854: Logical algebra was published by George Boole  known today as “Boolean Algebra” 1854: Logical algebra was published.
1 CK Cheng CSE Dept. UC San Diego CSE 140, Lecture 2 Combinational Logic.
Chapter 2: Boolean Algebra and Logic Functions
Boolean Algebra ‘An algebra of Logic’ Prepared by: Manish Kumar, Asst Master (Comp. Sc.) Sainik School Gopalganj.
Lecture 3: Incompletely Specified Functions and K Maps CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer.
Boolean Algebra – I. Outline  Introduction  Digital circuits  Boolean Algebra  Two-Valued Boolean Algebra  Boolean Algebra Postulates  Precedence.
Lecture 4 Logic gates and truth tables Implementing logic functions
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)
ECE 331 – Digital System Design
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
CSE 140, Lecture 2 Combinational Logic
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
ECE 301 – Digital Electronics Basic Logic Operations, Boolean Expressions, and Boolean Algebra (Lecture #3)
1 Boolean Algebra  Digital circuits Digital circuits  Boolean Algebra Boolean Algebra  Two-Valued Boolean Algebra Two-Valued Boolean Algebra  Boolean.
CSE 20: Lecture 7 Boolean Algebra CK Cheng
Lecture 3. Combinational Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
1 EENG 2710 Chapter 2 Algebraic Methods For The Analysis and Synthesis of Logic circuits.
CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22.
BR 2/1/991 Truth Tables (again) Recall that a boolean equation can be represented by a Truth Table A B C F
ECE 171 Digital Circuits Chapter 4 Boolean Algebra Herbert G. Mayer, PSU Status 2/1/2016 Copied with Permission from prof. Mark PSU ECE.
CSE 140: Components and Design Techniques for Digital Systems Lecture 3: Incompletely Specified Functions and K Maps CK Cheng Dept. of Computer Science.
CEC 220 Digital Circuit Design SOP and POS forms Friday, January 23 CEC 220 Digital Circuit Design Slide 1 of 17.
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/2016.
1 CS 352 Introduction to Logic Design Lecture 2 Ahmed Ezzat Boolean Algebra and Its Applications Ch-3 + Ch-4.
Chapter 12. Chapter Summary Boolean Functions Representing Boolean Functions Logic Gates Minimization of Circuits (not currently included in overheads)
ECE 301 – Digital Electronics
Lecture 3: Incompletely Specified Functions and K Maps
Logic Gates and Boolean Algebra
Chapter 2: Boolean Algebra and Logic Functions
ECE 2110: Introduction to Digital Systems
Complement of a Function
CHAPTER 1 : INTRODUCTION
Boolean Algebra.
CHAPTER 3 SETS AND BOOLEAN ALGEBRA
Boolean Expressions Lecture No. 10.
CSE 140, Lecture 2 Combinational Logic
CSE 311 Foundations of Computing I
Boolean Algebra.
Lecture 3: Incompletely Specified Functions and K Maps
Boolean Algebra & Logic Circuits
Basic Logic Gates 1.
CSE 370 – Winter Combinational Logic - 1
CSE 370 – Winter 2002 – Logic minimization - 1
EECS150 - Digital Design Lecture 7 - Boolean Algebra II
January 19 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05
CSE 20 Lecture 9 Boolean Algebra: Theorems and Transformations
Boolean Algebra Introduction CSCI 240
Boolean Algebra.
Chapter 2 Introduction to Logic Circuits
CSE 140 Lecture 3 Combinational Logic: Implementation
Chapter 2 Digital Design and Computer Architecture, 2nd Edition
Lecture 3: Incompletely Specified Functions and K Maps
Lecture 2: Combinational Logic Design
Presentation transcript:

1 CK Cheng CSE Dept. UC San Diego CSE 140, Lecture 2 Combinational Logic

2 Combinational Logic Outlines 1.Introduction 1.Scope 2.Review of Boolean Algebra 3.Review: Laws/Theorems and Digital Logic 2.Specification 3.Synthesis

3 1.1 Combinational Logic: Scope Description –Language: e.g. C Programming, Verilog, VHDL –Boolean algebra –Truth table Design –Schematic Diagram –Inputs, Gates, Nets, Outputs Goal –Validity: correctness, turnaround time –Performance: power, timing, cost –Testability: yield, diagnosis, robustness

4 Scope: Boolean Algebra for Logic Schematic Diagram: 5 primary inputs 1 primary output 4 gates (3 ANDs, 1 OR) 9 signal nets 12 pins a·b + c·d abab cdcd e c·d a·b y=e·(a·b+c·d) Boolean Algebra: 5 variables 1 expression 4 operators (3 ANDs, 1 OR) 5 literals Cost: #gates, #nets, #pins

5 Scope: Boolean Algebra for Logic Schematic Diagram: 5 primary inputs 4 components (gates) 9 signal nets 12 pins a·b + c·d abab cdcd e c·d a·b y=e·(a·b+c·d) Boolean Algebra: 5 literals 4 operators I.#operators II.#literals + #operators III.#literals + 2 #operators - 1 A.#inputs B.#gates C.#nets D.#pins E.None

Schematic Diagram vs. Boolean Expression Boolean Expression: #literals, #operators Schematic Diagram: #gates, #nets, #pins One more example? 6

1- Copyright © 2007 Elsevier1- Born to working class parents Taught himself mathematics and joined the faculty of Queen’s College in Ireland. Wrote An Investigation of the Laws of Thought (1854) Introduced binary variables Introduced the three fundamental logic operations: AND, OR, and NOT. 1.2 George Boole,

Switching Algebra Boolean Algebra: multiple-valued logic, i.e. each variable have multiple values. Switching Algebra: binary logic, i.e. each variable can be either 1 or 0. Boolean Algebra ≠ Switching Algebra BB Boolean Algebra Switching Algebra Two Level Logic

9Copyright © 2007 Elsevier 1- Scope: Binary Values Typically consider only two discrete values: –1’s and 0’s –1, TRUE, HIGH –0, FALSE, LOW 1 and 0 can be represented by specific voltage levels, rotating gears, fluid levels, etc. Digital circuits usually depend on specific voltage levels to represent 1 and 0 Bit: Binary digit

Switching Algebra Two Level Logic: Sum of products, or product of sums, e.g. ab + a’c + a’b’, (a’+c )(a+b’)(a+b+c’) Multiple Level Logic: Many layers of two level logic with some inverters, e.g. (((a+bc)’+ab’)+b’c+c’d)’bc+c’e Features of Digital Logic Design Multiple Outputs Don’t care sets Handy Tools: DeMorgan’s Law: Complements Consensus Theorem Shannon’s Expansion Truth Table Karnaugh Map (single output, two level logic) BB Boolean Algebra Switching Algebra Two Level Logic

Review of Boolean Algebra Let B be a nonempty set with two 2-input operations, a 1-input operation `, and two distinct elements 0 and 1. Then B is called a Boolean algebra if the following axioms hold. Commutative laws: a+b=b+a, a·b=b·a Distributive laws: a+(b·c)=(a+b)·(a+c), a·(b+c)=a·b+a·c Identity laws: a+0=a, a·1=a Complement laws: a+a’=1, a·a’=0

12 Two-input operator AND ( ˄, ∙ ) A B Y AND A1A1 A A B Y OR A1A1 1 A0A0 0 A0A0 A A Y NOT 1.3 Boolean algebra and switching functions: Operators and Digital Logic Gates 0 dominates in AND 0 blocks the output 1 passes signal A 1 dominates in OR 1 blocks the output 0 passes signal A Two-input operator OR ( ˅, + ) One-input operator NOT (Complement, ` )

13 1. Identity A * 1 = A A + 1 = 1 A * 0 = 0 A + 0 = A 2. Complement A + A’ = 1 A * A’ = 0 T8. Distributive Law A(B+C) = AB + AC A+BC = (A+B)(A+C) A BCBC ACAC ABAB A BCBC ACAC ABAB Review: Laws and Digital Logic

14 T7. Associativity (A+B) + C = A + (B+C) (AB)C = A(BC) C ABAB A BCBC C ABAB A BCBC Review: Laws and Digital Logic

1- DeMorgan’s Theorem and Digital Logic Y = (AB)’ = A’ + B’ Y = (A + B)’= A’B’ T12. DeMorgan’s Theorem (A+B)’ = A’B’ (AB)’ = A’ + B’

1- DeMorgan’s Theorem: Bubble Pushing Pushing bubbles backward (from the output) or forward (from the inputs) changes the body of the gate from AND to OR or vice versa. Pushing a bubble from the output back to the inputs puts bubbles on all gate inputs. Pushing bubbles on all gate inputs forward toward the output puts a bubble on the output and changes the gate body.

Consensus Theorem AB+AC+B’C =AB+B’C (A+B)(A+C)(B’+C) =(A+B)(B’+C) 1- Exercise: to prove the reduction using (1)Venn Diagrams, (2)Boolean algebra, (3)Logic simulation and (4) Shannon’s expansion The consensus of AB, B’C is: ?

Consensus Theorem: Venn Diagrams AB+AC+B’C : AB+B’C 1- B A C B A C

Consensus Theorem: Boolean Algebra AB+AC+B’C =AB+B’C (A+B)(A+C)(B’+C) =(A+B)(B’+C) 1- AB+AC+B’C =AB+AC1+B’C =AB+AC(B+B’)+B’C =AB+ABC+AB’C+B’C =AB(1+C)+(A+1)B’C =AB+B’C

Consensus Theorem: Logic Simulation f(A,B,C)= AB+AC+B’C g(A,B,C)=AB+B’C 1- Index ABCABACB’Cfg

1-

Shannon’s Expansion Shannon’s expansion assumes a switching algebra system Divide a switching function into smaller functions Pick a variable x, partition the switching function into two cases: x=1 and x=0 –f(x,y,z,…)= xf(x=1,y,z,…) + x’f(x=0,y,z,…) For example –f(x)=xf(1)+x’f(0) –f(x,y)=xf(1,y)+x’f(0,y)

Shannon’s Expansion: Example f(x,y,z)=xf(?,y,z)+x’f(?’,y,z) A.?=0 B.?=1. f(x,y)=(x+f(?,y))(x’+f(?’,y)) A. ?=0 B. ?=1.

Shannon’s Expansion 1-

Shannon’s Expansion: Example Which term in AB’+AC+BC can be deleted? A.AB’ B.AC C.BC D.None of the above 1-

Review Summary: Switching Algebra and Karnaugh Map Shannon’s expansion and consensus theorem are used for logic optimization Shannon’s expansion divides the problem into smaller functions Consensus theorem finds common terms when we merge small functions Karnaugh map mimics the above two operations in two dimensional space as a visual aid. 1-

29 Part I. Combinational Logic II) Specification 1. Language 2. Boolean Algebra Canonical Expression: Sum of minterms and Product of maxterms 3. Truth Table 4. Incompletely Specified Function

30 Decimal Addition Carry Sum Carryout Sums Carry bits II. Specification Binary Addition

Binary Addition: Hardware Half Adder: Two inputs (a,b) and two outputs (carry, sum). Full Adder: Three inputs (a,b,c in ) and two outputs (carry, sum). 31

32 Half Adder a b carry sum Truth Table a b Sum Carry

33 Switching Function Switching Expressions: Sum (a,b) = a’·b + a·b’ Carry (a, b) = a·b Ex: Sum (0,0) = 0’·0 + 0·0’ = = 0 Sum (0,1) = 0’·1 + 0·1’ = = 1 Sum (1,1) = 1’·1 + 1·1’ = = 0 a b sum a b carry

34 Full Adder Id a b c in carry sum Truth Table a b Sum Carry C in

35 Minterm and Maxterm Id a b c carryout a+b+c a+b+c’ a+b’+c a’ b c a’+b+c a b’c a b c’ a b c minterm maxterm

36 f 1 (a,b,c) = a’bc + ab’c + abc’ + abc a’bc = 1 iff (a,b,c,) = (0,1,1) ab’c = 1 iff (a,b,c,) = (1,0,1) abc’ = 1 iff (a,b,c,) = (1,1,0) abc = 1 iff (a,b,c,) = (1,1,1) f 1 (a,b,c) = 1 iff (a,b,c) = (0,1,1), (1,0,1), (1,1,0), or (1,1,1) Minterms Ex: f 1 (1,0,1) = 1’ ’ ’ = 1 f 1 (1,0,0) = 1’ ’ ’ = 0

37 f 2 (a,b,c) = (a+b+c)(a+b+c’)(a+b’+c)(a’+b+c) a + b + c = 0 iff (a,b,c,) = (0,0,0) a + b + c’ = 0 iff (a,b,c,) = (0,0,1) a + b’ + c = 0 iff (a,b,c,) = (0,1,0) a’ + b + c = 0 iff (a,b,c,) = (1,0,0) f 2 (a,b,c) = 0 iff (a,b,c) = (0,0,0), (0,0,1), (0,1,0), (1,0,0) Maxterms Ex: f 2 (1,0,1) = (1+0+1)(1+0+1’)(1+0’+1)(1’+0+1) = 1 f 2 (0,1,0) = (0+1+0)(0+1+0’)(0+1’+0)(0’+1+0) = 0

38 f 1 (a,b,c) = a’bc + ab’c + abc’ + abc f 2 (a,b,c) = (a+b+c)(a+b+c’)(a+b’+c)(a’+b+c) f 1 (a, b, c) = m 3 + m 5 + m 6 + m 7 =  m(3,5,6,7) f 2 (a, b, c) = M 0 M 1 M 2 M 4 =  M(0, 1, 2, 4) iClicker: Does f 1 = f 2 ? A.Yes B.No.

39 Id a b c in carry minterm 4 = ab’c’ The coverage of a single minterm. e.g. m 4 = ab’c’ Only one row has a 1.

40 Id a b c in carry maxterm 4 = a+b+c The coverage of a single maxterm. E.g. M 4 = a’+b+c Only one row has a 0.

41 Id a b f (a, b) )The input does not happen. 2)The input happens, but the output is ignored. Examples: -Decimal number 0… 9 uses 4 bits. (1,1,1,1) does not happen. -Final carry out bit (output is ignored). Don’t care set is important because it allows us to minimize the function Incompletely Specified Function

42 Incompletely Specified Function Id a b c g(a,b,c) g 1 (a,b,c)=a’b’c+a’bc+ab’b’+abc =m 1 +m 3 +m 4 +m 7 =∑ m(1,3,4,7) g 2 (a,b,c)=(a+b+c)(a’+b’+c) =M 0 M 6 =∏M(0,6) Exercise: Does g 1 (a,b,c) = g 2 (a,b,c)?