CSE 140 Lecture 3 Combinational Logic: Implementation

Slides:



Advertisements
Similar presentations
Techniques for Combinational Logic Optimization
Advertisements

1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
ECE 301 – Digital Electronics Karnaugh Maps (Lecture #7) The slides included herein were taken from the materials accompanying Fundamentals of Logic Design,
ECE 301 – Digital Electronics Minterm and Maxterm Expansions and Incompletely Specified Functions (Lecture #6) The slides included herein were taken from.
ENGIN112 L8: Minimization with Karnaugh Maps September 19, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 8 Minimization with Karnaugh.
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.
CS 140 Lecture 3 Professor CK Cheng 10/3/02. 1.Specification 2.Implementation 3.K-maps Part I.
1 CS 20 Lecture 14 Karnaugh Maps Professor CK Cheng CSE Dept. UC San Diego.
CS 140 Lecture 3 Professor CK Cheng Tuesday 4/09/02.
1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
CS 140 Lecture 4 Professor CK Cheng Tuesday 5/08/02.
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.
CS 140 Lecture 4 Combinational Logic: K-Map Professor CK Cheng CSE Dept. UC San Diego 1.
1 CSE20 Lecture 16 Boolean Algebra: Applications Professor CK Cheng CSE Dept. UC San Diego 1.
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.
CS 151 Digital Systems Design Lecture 8 Minimization with Karnaugh Maps.
CS 140 Lecture 5 Professor CK Cheng CSE Dept. UC San Diego.
CS 140 Lecture 5 Professor CK Cheng CSE Dept. UC San Diego 1.
Simplifying Boolean Expressions Using K-Map Method
1 CK Cheng CSE Dept. UC San Diego CSE 140, Lecture 2 Combinational Logic.
Lecture 3: Incompletely Specified Functions and K Maps CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer.
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC. K-Map (1)  Karnaugh Mapping is used to minimize the number of logic gates that are required in a digital circuit.
CSE 140, Lecture 2 Combinational Logic
07 KM Page 1 ECEn/CS 224 Karnaugh Maps. 07 KM Page 2 ECEn/CS 224 What are Karnaugh Maps? A simpler way to handle most (but not all) jobs of manipulating.
LOGIC GATES & BOOLEAN ALGEBRA
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
BR 2/1/991 Truth Tables (again) Recall that a boolean equation can be represented by a Truth Table A B C F
1 CK Cheng CSE Dept. UC San Diego CSE 140, Lecture 2 Combinational Logic.
C.S.Choy39 TERMINOLOGY Minterm –product term containing all input variables of a function in either true or complementary form Maxterm – sum term containing.
 Seattle Pacific University EE Logic System DesignKMaps-1 Two-Level Simplification All Boolean expressions can be represented in two- level forms.
CSE 140: Components and Design Techniques for Digital Systems Lecture 3: Incompletely Specified Functions and K Maps CK Cheng Dept. of Computer Science.
Lecture 4: Four Input K-Maps CSE 140: Components and Design Techniques for Digital Systems CK Cheng Dept. of Computer Science and Engineering University.
K-map Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
Figure 5–5 Exclusive-OR logic diagram and symbols. Open file F05-05 to verify the operation. Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by.
School of Computer and Communication Engineering, UniMAP DKT 122/3 - DIGITAL SYSTEM I Chapter 4A:Boolean Algebra and Logic Simplification) Mohd ridzuan.
Lecture 5: K-Map minimization in larger input dimensions and K-map minimization using max terms CSE 140: Components and Design Techniques for Digital Systems.
1 EENG 2710 Chapter 3 Simplification of Switching Functions.
Lecture 3: Incompletely Specified Functions and K Maps
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Prof. Hsien-Hsin Sean Lee
Minimization of Circuits
CSE 140: Components and Design Techniques for Digital Systems
CSE 140 Lecture 12 Combinational Standard Modules
Boolean Expressions Lecture No. 10.
Karnaugh Maps.
ECE 331 – Digital System Design
CSE 140 Lecture 12 Combinational Standard Modules
Lecture 3: Incompletely Specified Functions and K Maps
ECE 331 – Digital System Design
CHAPTER 5 KARNAUGH MAPS 5.1 Minimum Forms of Switching Functions
CSE 140: Components and Design Techniques for Digital Systems
CSE 370 – Winter 2002 – Logic minimization - 1
ECE 331 – Digital System Design
Combinatorial Logic Circuit
ECE 331 – Digital System Design
CSE 20 Lecture 9 Boolean Algebra: Theorems and Transformations
ECE 331 – Digital System Design
Overview Part 2 – Circuit Optimization
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Professor CK Cheng CSE Dept. UC San Diego
CSE 140 Lecture 4 Combinational Logic: K-Map
Karnaugh Map Method By: Asst Lec. Besma Nazar Nadhem
Chapter 2 Digital Design and Computer Architecture, 2nd Edition
Lecture 3: Incompletely Specified Functions and K Maps
ECE 331 – Digital System Design
Lecture 2: Combinational Logic Design
Presentation transcript:

CSE 140 Lecture 3 Combinational Logic: Implementation Professor CK Cheng CSE Dept. UC San Diego

Part I Combinational Logic. Specification Implementation K-maps

Definitions Literals xi or xi’ Product Term x2x1’x0 Sum Term x2 + x1’ + x0 Minterm of n variables: A product of n literals in which every variable appears exactly once. Maxterm of n variables: A sum of n literals

Implementation Specification  Schematic Diagram Net list, Switching expression Obj min cost  Search in solution space (max performance) Cost: wires, gates  Literals, product terms, sum terms We want to minimize # of terms, # of literals

Implementation Specification  Schematic Diagram Net list, Flow: Truth Table Karnaugh Map (truth table in two dimensional space) Sum of Products or Product of Sums Schematic Diagram of Two Level Logic

Truth Table vs. Karnaugh Map 2-variable function, f(A,B) ID A B f(A,B) f(0,0) 1 f(0,1) 2 f(1,0) 3 f(1,1) A=0 A=1 B=0 f(0,0) f(1,0) B=1 f(0,1) f(1,1)

Truth Table An example of 2-variable function, f(A,B) ID A B f(A,B) minterm 1 A’B 2 AB’ 3 AB

Function can be represented by sum of minterms: f(A,B) = A’B+AB’+AB This is not optimal however! We want to minimize the number of literals and terms. We factor out common terms – A’B+AB’+AB= A’B+AB’+AB+AB =(A’+A)B+A(B’+B)=B+A Hence, we have f(A,B) = A+B

0 1 1 1 f(A,B) = A + B K-Map: Truth Table in 2 Dimensions A = 0 A = 1 0 2 0 1 1 1 B = 0 B = 1 1 3 A’B AB f(A,B) = A + B

Another Example ID A B f(A,B) minterm 1 A’B 2 3 AB 1 A’B 2 3 AB f(A,B)=A’B+AB=(A’+A)B=B

On the K-map: A = 0 A= 1 0 2 B= 0 B = 1 0 0 1 1 1 3 A’B AB f(A,B)=B

Using Maxterms ID A B f(A,B) Maxterm A+B 1 2 A’+B 3 A+B 1 2 A’+B 3 f(A,B)=(A+B)(A’+B)=(AA’)+B=0+B=B

Two Variable K-maps # possible 2-variable functions: iClicker 4 16 32 Id a b f (a, b) 0 0 0 f (0, 0) 1 0 1 f (0, 1) 2 1 0 f (1, 0) 3 1 1 f (1, 1) # possible 2-variable functions: iClicker 4 16 32 81 None of the above f(a,b) a b

Two Variable K-maps # possible 2-variable functions: Id a b f (a, b) 0 0 0 f (0, 0) 1 0 1 f (0, 1) 2 1 0 f (1, 0) 3 1 1 f (1, 1) # possible 2-variable functions: For 2 variables as inputs, we have 4=22 entries. Each entry can be 0 or 1. Thus we have 16=24 possible functions. a b f(a,b)

Two-Input Logic Gates

More Two-Input Logic Gates

Representation of k-Variable Func. Boolean Expression Truth Table Cube K Map Binary Decision Diagram (0,1,1,0) (0,1,1,1) (1,1,1,0) (1,1,1,1) B (0,0,1,0) (0,0,1,1) (1,0,1,0) (1,0,1,1) C (0,1,0,1) (1,1,0,1) D (0,0,0,0) (0,0,0,1) (1,0,0,0) (1,0,0,1) A A cube of 4 variables: (A,B,C,D)

Truth Table vs. Karnaught Map 3-variable function, f(A,B,C) ID A B C f(A,B,C) f(0,0,0) 1 f(0,0,1) 2 f(0,1,0) 3 f(0,1,1) 4 f(1,0,0) 5 f(1,0,1) 6 f(1,1,0) 7 f(1,1,1) (A,B) (0,0) (0,1) (1,1) (1,0) C=0 f(0,0,0) f(0,1,0) f(1,1,0) f(1,0,0) C=1 f(0,0,1) f(0,1,1) f(1,1,1) f(1,0,1)

Three-Variable K-Map Id a b c f (a,b,c) 0 0 0 0 1 1 0 0 1 0 2 0 1 0 1 0 0 0 0 1 1 0 0 1 0 2 0 1 0 1 3 0 1 1 0 4 1 0 0 1 5 1 0 1 0 6 1 1 0 1 7 1 1 1 0

(0,0) (0,1) (1,1) (1,0) 1 1 1 1 0 0 0 0 Corresponding K-map b = 1 Gray code (0,0) (0,1) (1,1) (1,0) 0 2 6 4 c = 0 1 1 1 1 1 3 7 5 c = 1 0 0 0 0 a = 1 f(a,b,c) = c’

Karnaugh Maps (K-Maps) Boolean expressions can be minimized by combining terms K-maps minimize equations graphically

K-map Circle 1’s in adjacent squares Find rectangles which correspond to product terms in Boolean expression y(A,B)=A’B’C’+A’B’C= A’B’(C’+C)=A’B’

Another 3-Input example Id a b c f (a,b,c) 0 0 0 0 0 1 0 0 1 0 2 0 1 0 1 3 0 1 1 0 4 1 0 0 1 5 1 0 1 1 6 1 1 0 - 7 1 1 1 1

(0,0) (0,1) (1,1) (1,0) 0 1 - 1 0 0 1 1 Corresponding K-map b = 1 (0,0) (0,1) (1,1) (1,0) 0 2 6 4 c = 0 0 1 - 1 1 3 7 5 c = 1 0 0 1 1 a = 1 f(a,b,c) = a + bc’

Yet another example Id a b c f (a,b,c,d) 0 0 0 0 1 1 0 0 1 1 2 0 1 0 - 0 0 0 0 1 1 0 0 1 1 2 0 1 0 - 3 0 1 1 0 4 1 0 0 1 5 1 0 1 1 6 1 1 0 0 7 1 1 1 0

(0,0) (0,1) (1,1) (1,0) 1 - 0 1 1 0 0 1 Corresponding K-map b = 1 (0,0) (0,1) (1,1) (1,0) 0 2 6 4 c = 0 1 - 0 1 1 3 7 5 c = 1 1 0 0 1 a = 1 f(a,b,c) = b’

Karnaugh Maps (K-Maps) Consensus Theorem: A’B+AC+BC=A’B+AC

4-input K-map

4-input K-map

4-input K-map

K-maps with Don’t Cares

K-maps with Don’t Cares

K-maps with Don’t Cares