CSE 140: Components and Design Techniques for Digital Systems Lecture 3: Incompletely Specified Functions and K Maps CK Cheng Dept. of Computer Science.

Slides:



Advertisements
Similar presentations
1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
Advertisements

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.
ECE 331 – Digital System Design
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 6 Dr. Shi Dept. of Electrical and Computer Engineering.
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.
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.
CS 140 Lecture 4 Combinational Logic: K-Map Professor CK Cheng CSE Dept. UC San Diego 1.
1 CS 140 Lecture 3 Combinational Logic Professor CK Cheng CSE Dept. UC San Diego.
CS 140 Lecture 6 Professor CK Cheng UC San Diego.
Canonical Forms and Logic Miniminization
ECE 331 – Digital System Design Karnaugh Maps and Determining a Minimal Cover (Lecture #7) The slides included herein were taken from the materials accompanying.
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.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
Lecture 3: Incompletely Specified Functions and K Maps CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer.
Logic Function Optimization. Combinational Logic Circuit Regular SOP and POS designs Do not care expressions Digital logic circuit applications Karnaugh.
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)
Switching functions The postulates and sets of Boolean logic are presented in generic terms without the elements of K being specified In EE we need to.
K-map Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
Department of Computer Engineering
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.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. Circuit Optimization Logic and Computer Design Fundamentals.
ECE 2110: Introduction to Digital Systems PoS minimization Don’t care conditions.
CSE 140, Lecture 2 Combinational Logic
Computer Engineering (Logic Circuits) (Karnaugh Map)
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
Ahmad Almulhem, KFUPM 2010 COE 202: Digital Logic Design Combinational Logic Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
Test Slide SAT MCAT GRE. CSE 370 Spring 2006 Introduction to Digital Design Lecture 5: Canonical Forms Last Lecture Logic Gates Different Implementations.
Copied with Permission from prof. Mark PSU ECE
Prof. Hsien-Hsin Sean Lee
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
Karnaugh Maps Not in textbook. Karnaugh Maps K-maps provide a simple approach to reducing Boolean expressions from a input-output table. The output from.
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.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
Lecture 4: Four Input K-Maps CSE 140: Components and Design Techniques for Digital Systems CK Cheng Dept. of Computer Science and Engineering University.
Boolean Functions 1 ECE 667 ECE 667 Synthesis and Verification of Digital Circuits Boolean Functions Basics Maciej Ciesielski Univ.
K-map Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
ECE 301 – Digital Electronics Minimizing Boolean Expressions using K-maps, The Minimal Cover, and Incompletely Specified Boolean Functions (Lecture #6)
School of Computer and Communication Engineering, UniMAP DKT 122/3 - DIGITAL SYSTEM I Chapter 4A:Boolean Algebra and Logic Simplification) Mohd ridzuan.
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 7 – Karnaugh Maps.
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.
CEC 220 Digital Circuit Design Minterms and Maxterms Monday, January 26 CEC 220 Digital Circuit Design Slide 1 of 11.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
1 EENG 2710 Chapter 3 Simplification of Switching Functions.
Lecture 3: Incompletely Specified Functions and K Maps
CSE 140: Components and Design Techniques for Digital Systems
Karnaugh Maps.
Lecture 3: Incompletely Specified Functions and K Maps
ECE 331 – Digital System Design
CSE 140: Components and Design Techniques for Digital Systems
CSE 370 – Winter 2002 – Logic minimization - 1
ECE 331 – Digital System Design
COE 202: Digital Logic Design Combinational Logic Part 3
Overview Part 2 – Circuit Optimization
CSE 140 Lecture 3 Combinational Logic: Implementation
CSE 140 Lecture 4 Combinational Logic: K-Map
Lecture 3: Incompletely Specified Functions and K Maps
ECE 331 – Digital System Design
Presentation transcript:

CSE 140: Components and Design Techniques for Digital Systems Lecture 3: Incompletely Specified Functions and K Maps CK Cheng Dept. of Computer Science and Engineering University of California, San Diego 1

2 Definitions Minterms and Maxterms Incompletely Specified Function Implementation: Boolean Algebra vs Map Karnaugh Maps: Two Dimensional Truth Table 2-Variable Map 3-Variable Map Up to 6-Variable Map Outlines

3 Literals x i or x i ’ Product Termx 2 x 1 ’x 0 Sum Termx 2 + x 1 ’ + x 0 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 in which every variable appears exactly once. Adjacency: Two minterms are adjacent if they differ by only one variable. Definitions

4 Minterm of n variables: A product of n literals in which every variable appears exactly once. E.g. For funciton f(a,b,c,d,e), abcde, a’b’c’de are minterms, while bcd, a’bcd are not. Maxterm of n variables: A sum of n literals in which every variable appears exactly once. Adjacency: Two minterms are adjacent if they differ by only one variable. E.g. abcde and a’bcde are adjacent, while a’b’cde and abc’d’e’ are not Definitions

5 For two terms ab’c’d’ and ab’cd’, are they adjacent? A.Yes B.No iClicker Adjacency allows us to merge the terms to reduce the Boolean expression.

6 Id a b f (a, b) X (don’t care) For example: 1)The input pattern does not happen. 2)The input pattern happens, but the output is ignored. Example: -Decimal number 0… 9 uses 4 bits. (1,1,1,1) does not happen. Situations where the output of a switching function can be either 0 or 1 for a particular combination of inputs This is specified by a don’t care in the truth table Incompletely Specified Function

7 How to completely specify the truth table in canonical form? We have three types of output which divides the input space into three sets: Onset F : All the input conditions for which the output is 1 Offset R: All the input conditions for which the output is 0 Don’t care D: All the input conditions for which the output is a ‘don’t care’ Example: The truth table on right has F covers input pattern (a,b)=(1,0) R covers input patters (a,b)=(0,0) and (1,1) D covers input pattern (a,b)=(0,1) The union of F, R, D is the whole set of all input patterns. Idab F(a,b) X

8 iClicker Q: Which of the following assignment would result in an implementation with the fewest gates? Reducing Incompletely Specified Functions Id ab F(a,b) X A.F(1,1)=1 B.F(1,1)=0 C.Neither A or B D.Both A and B

9 Don’t care set is important because it allows us to minimize the function Reducing Incompletely Specified Functions Id ab F(a,b) F(a,b)=a

10 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 For two level logic (sum of products or product of sums), we want to minimize # of terms, and # of literals

11 Implementation: Specification => Logic Diagram Flow 1: 1.Specification 2.Truth table 3.Sum of products (SOP) or product of sums(POS) canonical form 4.Reduced expression using Boolean algebra 5.Schematic diagram of two level logic Flow 2: 1.Specification 2.Truth Table 3.Karnaugh Map (truth table in two dimensional space) 4.Reduce using K’Maps 5.Reduced expression (SOP or POS) 6.Schematic diagram of two level logic Karnaugh Map: A 2-dimensional truth table

12 Truth Table vs. Karnaugh Map IDABf(A,B) 000f(0,0) 101f(0,1) 210f(1,0) 311f(1,1) 2-variable function, f(A,B) B=0B=1 A= 0 f(0,0)f(0,1) A= 1 f(1,0)f(1,1)

13 Truth Table IDABf(A,B)minterm A’BA’B 2101AB’ 3111AB An example of 2-variable function, f(A,B)

14 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.

15 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

How can we guarantee the most reduced expression was reached? Boolean expressions can be minimized by combining terms K-maps minimize equations graphically 16 IDABf(A,B) 000f(0,0) 101f(0,1) 210f(1,0) 311f(1,1) B=0B=1 A=0 A’B’A’B A=1 AB’AB

17 K-Map: Truth Table in 2 Dimensions B = 0 B = 1 A = 0 A = IDABf(A,B)

18 K-Map: Truth Table in 2 Dimensions B = 0 B = 1 A = 0 A = f(A,B) = A + B IDABf(A,B)

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

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

21 Corresponding three variable K-map c = 1 (0,0) (0,1) (1,1) (1,0) c = 0 Gray code (a,b) Id a b c f (a,b,c) Truth table

22 Karnaugh Maps (K-Maps) K-maps minimize equations graphically Note that the label decides the order in the map

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

24 Corresponding K-map c = X (0,0) (0,1) (1,1) (1,0) c = 0 Id a b c f (a,b,c) X Another 3-Input truth table

25 Corresponding K-map b = 1 c = 1 a = X (0,0) (0,1) (1,1) (1,0) c = 0 f(a,b,c) = a + bc’ Id a b c f (a,b,c) X Another 3-Input truth table

26 Corresponding K-map c = 1 1 X (0,0) (0,1) (1,1) (1,0) c = 0 Id a b c f (a,b,c,d) X Input Truth table with Don’t cares PI Q: In the above case the minimal Boolean expression is obtained when the don’t care term is: A.Included i.e. Circled in with one or more minterms that evaluate to 1 B.Excluded when grouping the minterms that evaluate to one C.Either approach gives the minimal expression

27 Corresponding K-map c = 1 1 X (0,0) (0,1) (1,1) (1,0) c = 0 Id a b c f (a,b,c,d) X Input Truth table with Don’t cares PI Q: In the above case the minimal Boolean expression is obtained when the don’t care term is: A.Included i.e. Circled in with one or more minterms that evaluate to 1 B.Excluded when grouping the minterms that evaluate to one C.Either approach gives the minimal expression

28 Corresponding K-map b = 1 c = 1 a = 1 1 X (0,0) (0,1) (1,1) (1,0) c = 0 f(a,b,c) = b’ Id a b c f (a,b,c,d) X Input Truth table with Don’t cares

29 Proof of Consensus Theorem using K Maps Consensus Theorem: A’B+AC+BC=A’B+AC