Computer Architecture I: Digital Design Dr. Robert D. Kent Lecture 3 Simplification of Boolean Expressions.

Slides:



Advertisements
Similar presentations
CSEE 4823 Advanced Logic Design Handout: Lecture #2 1/22/15
Advertisements

K-Map Simplification COE 202 Digital Logic Design Dr. Aiman El-Maleh
Based on slides by: Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 8 – Systematic Simplification.
ECE 3110: Introduction to Digital Systems Simplifying Sum of Products using Karnaugh Maps.
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Circuit Optimization Goal: To obtain the simplest implementation for a given function Optimization is a more formal approach to simplification that is.
Karnaugh Maps for Simplification
Example: Given a 4-bit input combination N=N 3 N 2 N 1 N 0, this function produces a 1 output for N=1,2,3,5,7,11,13, and 0 otherwise.  According to the.
Computer Engineering (Logic Circuits) (Karnaugh Map)
ENEE244-02xx Digital Logic Design Lecture 10. Announcements HW4 assigned, due 10/9.
SYEN 3330 Digital Systems Jung H. Kim Chapter SYEN 3330 Digital Systems Chapter 2 – Part 5.
EECC341 - Shaaban #1 Lec # 7 Winter Combinational Circuit Minimization Canonical sum and product logic expressions do not provide a circuit.
Propositional Calculus Math Foundations of Computer Science.
Simplifying Boolean Expressions Using K-Map Method
IKI a-Simplification of Boolean Functions Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 2 – Combinational.
Department of Computer Engineering
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
F = ∑m(1,4,5,6,7) F = A’B’C+ (AB’C’+AB’C) + (ABC’+ABC) Use X’ + X = 1.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
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.
ECE 3110: Introduction to Digital Systems Symplifying Products of sums using Karnaugh Maps.
Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
Boolean Algebra Introduction Logical arguments are valid (or not) by virtue of their form, not content Example All men are mortal(premise 1) Harry is a.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
Gate-Level Minimization
Gate-level Minimization
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
Computer Engineering (Logic Circuits) (Karnaugh Map)
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
LOGIC GATES & BOOLEAN ALGEBRA
CS1Q Computer Systems Lecture 7
Ahmad Almulhem, KFUPM 2010 COE 202: Digital Logic Design Combinational Logic Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
February 2, 2004CS 2311 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are AND, OR and.
ENG241 Digital Design Week #2 Combinational Logic Circuits.
CS231 Boolean Algebra1 Summary so far So far: – A bunch of Boolean algebra trickery for simplifying expressions and circuits – The algebra guarantees us.
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.
Karnaugh Map and Circuit Design.
June 12, 2002© Howard Huang1 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are.
ECE/CS 352 Digital System Fundamentals1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapter 2 – Part 5 Tom Kaminski & Charles R. Kime.
1 Gate Level Minimization EE 208 – Logic Design Chapter 3 Sohaib Majzoub.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
ECE 301 – Digital Electronics Minimizing Boolean Expressions using K-maps, The Minimal Cover, and Incompletely Specified Boolean Functions (Lecture #6)
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 7 – Karnaugh Maps.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
Assembly Lab1 - Review.
CHAPTER 3 Simplification of Boolean Functions
ECE 2110: Introduction to Digital Systems
Computer Organisation
Chapter 4 Simplification of Boolean Functions Karnaugh Maps
3-7 Other Two-level Implementations
CS 352 Introduction to Logic Design
ECE 2110: Introduction to Digital Systems
Lecture 3 Boolean algebra
Lecture 4 Sums of Product Circuits Simplification
Chapter 3 Gate-level Minimization.
MINTERMS and MAXTERMS Week 3
COE 202: Digital Logic Design Combinational Logic Part 3
Minimization of Switching Functions
Overview Part 2 – Circuit Optimization
Karnaugh maps Last time we saw applications of Boolean logic to circuit design. The basic Boolean operations are AND, OR and NOT. These operations can.
Circuit Simplification and
Presentation transcript:

Computer Architecture I: Digital Design Dr. Robert D. Kent Lecture 3 Simplification of Boolean Expressions

A. Cost Models B. Reduction Techniques - i. Karnaugh Map Method

The Simplification Problem: Requirements Simplification of complex circuits, starting from their equivalent representation as complex Boolean expressions, requires an understanding of cost. We will see that the typical goal is to arrive at Boolean expressions that: –are expressible in SOP (or POS) form –involve minimal numbers of literals –involve a minimal number of gate application levels To help us understand how to accomplish circuit minimization, we will study one powerful reduction technique: –Karnaugh maps

Concepts of Cost We focus on two types of cost model. Minimum time of completion of circuit logic –both SOP and POS circuit representations are two-level designs with all the gates at each level performing in parallel with the same time characteristics. Minimum cost of circuit construction –very often it is possible, starting with the SOP or POS forms, to rewrite a near-optimal cost form involving pure nand or nor gates only. This leads to four cost theorems.

Concepts of Cost Before stating the theorems we need some definitions of terms: –Literala variable or its complement (unique symbol) –ImpliesF implies G, means that there does not exist a set of N input literals such that both F=1 and G=0; By contrast, if F=1 then G must be equal to 1. –SubsumesA term T 1 subsumes a term T 2 if and only if (!) all the literals in T 2 are also found in T 1. If one term subsumes another in an expression, then the subsuming term can always be deleted with changing the function. In other words, if T 1 subsumes T 2 then T 1 may be ignored because the T 2 terms account for logic.

Concepts of Cost … and some more definitions of terms: –Implicanta product term is said to be an implicant of a complete function if the product term implies the function. –Implicatea sum term is said to be an implicate of a complete function if the sum term implies the function.

Concepts of Cost … and some more definitions of terms: –Prime Implicantan implicant is a prime implicant if it does not subsume any other implicant with fewer literals. This means that if any literal is removed from the term, it no longer implies the function. –Prime Implicatean implicate is a prime implicate if it does not subsume any other implicate with fewer literals. This means that if any literal is removed from the term, it no longer implies the function. Note the symmetry between the definitions of implicant (product) and implicate (sum).

Concepts of Cost Cost Theorem 1a. When the cost, assigned by some criterion, for a minimal Boolean formula is such that decreasing the number of literals in the disjunctive normal formula does not increase the cost of the formula, there is at least one minimal disjunctive normal formula that corresponds to a sum of prime implicants. Cost Theorem 2a. For any cost criterion such that the cost of a formula does not increase when a literal is removed, at least one minimal disjunctive normal formula describing a function is an irredundant disjunctive normal formula (SOP).

Concepts of Cost Cost Theorem 1b. When the cost, assigned by some criterion, for a minimal Boolean formula is such that decreasing the number of literals in the conjunctive normal formula does not increase the cost of the formula, there is at least one minimal conjunctive normal formula that corresponds to a product of prime implicates. Cost Theorem 2b. For any cost criterion such that the cost of a formula does not increase when a literal is removed, at least one minimal conjunctive normal formula describing a function is an irredundant conjunctive normal formula (POS). These theorems establish that implicates are dual to implicants.

Expression Simplification The algebraic techniques we have developed are too slow and uncertain to apply in cases where the numbers of variables are large. To meet the needs of modern circuit analysis and design several methods have been developed that –are somewhat scalable, and –permit limited degrees of automation (ie. Programmability).

Karnaugh Maps

The use of mapping, or tableau-based, techniques were developed by Veitch and modified by Karnaugh. We will determine these techniques by studying examples in order to establish the rules for map manipulation.

Karnaugh Maps 1 variable map x f(x) 0 f(0) 1 f(1) Truth Table

Karnaugh Maps 1 variable map x f(x) 0 f(0) 1 f(1) Truth Table Literal Binary Values Function Values

Karnaugh Maps 1 variable map x f(x) 0 f(0) 1 f(1) f(0)f(1) x 0 1 Truth Table Literal Binary Values Function Values Literal Binary Values Function Values

Karnaugh Maps 1 variable map x f(x) 0 f(0) 1 f(1) f(0)f(1) x 0 1 Truth Table1x2 Karnaugh Map

Karnaugh Maps 2 variable map x y f(x,y) 0 0 f(0,0) 0 1 f(0,1) 1 0 f(1,0) 1 1 f(1,1) Truth Table

Karnaugh Maps 2 variable map x y f(x,y) 0 0 f(0,0) 0 1 f(0,1) 1 0 f(1,0) 1 1 f(1,1) f(0,0) y 0 1 0x10x1 f(1,0) f(0,1) f(1,1) Truth Table2x2 Karnaugh Map

Karnaugh Maps 3 variable map x y z f(x,y,z) f(000) f(001) f(010) f(011) f(100) f(101) f(110) f(111) f(000) f(001) f(011) f(010) yz x10x1 f(100) f(101) f(111) f(110) 2x4 Karnaugh Map

Karnaugh Maps 3 variable map x y z f(x) f(000) f(001) f(010) f(011) f(100) f(101) f(110) f(111) f(000) f(001) f(011) f(010) yz x10x1 f(100) f(101) f(111) f(110) 2x4 Karnaugh Map Note the way that the column indices change by only 1 bit at a time from left to right.

Karnaugh Maps 3 variable map x y z f(x,y,z) f(000) f(001) f(010) f(011) f(100) f(101) f(110) f(111) f(000) f(001) f(011) f(010) y x10x1 f(100) f(101) f(111) f(110) 2x4 Karnaugh Map An alternative labelling scheme is based on which literal has value 1. z

Karnaugh Maps 3 variable map x y z f(x,y,z) f(000) f(001) f(010) f(011) f(100) f(101) f(110) f(111) y x10x x4 Karnaugh Map One final alternative labelling scheme replaces the function value by the decimal minterm index value. z

Karnaugh Maps 4 variable map w x y z f(w,x,y,z) f(0000) f(0001) f(0010) f(0011) f(0100) f(0101) f(0110) f(0111) f(1000) f(1001) f(1010) f(1011) f(1100) f(1101) f(1110) f(1111)

Karnaugh Maps 4 variable map w x y z f(w,x,y,z) f(0000) f(0001) f(0010) f(0011) f(0100) f(0101) f(0110) f(0111) f(1000) f(1001) f(1010) f(1011) f(1100) f(1101) f(1110) f(1111) f(0000) f(0001) f(0011) f(0010) yz wx f(1000) f(1001) f(1011) f(1010) f(0100) f(0101) f(0111) f(0110) f(1100) f(1101) f(1111) f(1110)

Karnaugh Maps 4 variable map w x y z f(w,x,y,z) f(0000) f(0001) f(0010) f(0011) f(0100) f(0101) f(0110) f(0111) f(1000) f(1001) f(1010) f(1011) f(1100) f(1101) f(1110) f(1111) yz wx Note the way that both the row and column indices change by only 1 bit at a time.

Karnaugh Maps 4 variable map w x y z f(w,x,y,z) f(0000) f(0001) f(0010) f(0011) f(0100) f(0101) f(0110) f(0111) f(1000) f(1001) f(1010) f(1011) f(1100) f(1101) f(1110) f(1111) yz wx Note the way that both the row and column indices change by only 1 bit at a time. This implies that two rows, or columns, whose indices differ by only 1 bit value, are adjacent.

Karnaugh Maps 4 variable map w x y z f(w,x,y,z) f(0000) f(0001) f(0010) f(0011) f(0100) f(0101) f(0110) f(0111) f(1000) f(1001) f(1010) f(1011) f(1100) f(1101) f(1110) f(1111) yz wx Note the way that both the row and column indices change by only 1 bit at a time. This implies that two rows, or columns, whose indices differ by only 1 bit value, are adjacent. WRAP-AROUND!

Karnaugh Maps 4 variable map w x y z f(w,x,y,z) f(0000) f(0001) f(0010) f(0011) f(0100) f(0101) f(0110) f(0111) f(1000) f(1001) f(1010) f(1011) f(1100) f(1101) f(1110) f(1111) y x An alternative row/column labelling, highlighting the literal with value 1. w z

Karnaugh Maps Case Study: 1 variable map Ex. Place function values (from the defining function truth table) in the map positions. 01 x 0 1 XF(X) 00 11

Karnaugh Maps Case Study: 1 variable map 01 x 0 1 Circle all 1 entries that, taken together, form a subcube (i.e. rectangular shape formed from 1- boxes, without holes).

Karnaugh Maps Case Study: 1 variable map 01 x 0 1 Circle all 1 entries that, taken together, form a subcube (i.e. rectangle). DEFINITION: When constructing SOP forms, a 2 N -subcube is a rectangular region of a Karnaugh map consisting of 2 N adjacent cells, each containing the same value 1 (or 0 for POS forms), and where N must be an integer greater or equal to zero.

Karnaugh Maps Case Study: 1 variable map 01 x 0 1 The entry 1 in the second column corresponds to the prime implicant x.

Karnaugh Maps Case Study: 1 variable map 01 x 0 1 The entry 1 in the second column corresponds to the prime implicant x. Recall that x is a prime implicant iff: - x implies f(x) and, - x does not subsume any other implicant: Since, removing x from itself leaves nothing, then x is clearly prime.

Karnaugh Maps Case Study: 1 variable map 01 x 0 1 Thus, the minimal expression of the function is: F(x) = x

Karnaugh Maps Case Study: 1 variable map - Complementation 10 x 0 1 The entry 1 in the first column corresponds to the prime implicant x’. XF(X) 01 10

Karnaugh Maps Case Study: 1 variable map - Complementation 10 x 0 1 The entry 1 in the first column corresponds to the prime implicant x’. Thus, the minimal expression of the function is: F(x) = x’ XF(X) 01 10

Karnaugh Maps Case Study: 1 variable map - 2nd variation 11 x 0 1 Circle all 1 entries that, taken together, form a subcube (i.e. rectangle). XF(X) 01 11

Karnaugh Maps Case Study: 1 variable map - 2nd variation 11 x 0 1 We note that both x and x’ terms are included in the rectangle. Their individual “product” contributions to the SOP expression must be summed (or’ed): x + x’ But, this reduces to 1. XF(X) 01 11

Karnaugh Maps Case Study: 1 variable map - 2nd variation 11 x 0 1 Thus, the minimal expression of the function is: F(x) = 1 XF(X) 01 10

Karnaugh Maps Case Study: 1 variable map - 2nd variation 11 x 0 1 Thus, the minimal expression of the function is: f = 1 In other words, when both 0 and 1 terms appear for a literal referenced within the cells of a subcube, that literal is removed from the implicant corresponding to that subcube, leaving a prime implicant. XF(X) 01 10

Karnaugh Maps 3 variable map yz x10x x4 Karnaugh Map Place function values (from the defining function truth table) in the map positions. XYZF(X,Y,Z)

Karnaugh Maps 3 variable map yz x10x1 1 0 Circle all 1 entries that, taken together, form a subcube (i.e. rectangle). Start with the largest subcubes, then proceed to smaller subcubes Generally speaking, there will be more than one independent subcube, each reflecting a different prime implicant. XYZF(X,Y,Z)

Karnaugh Maps 3 variable map yz x10x1 1 0 y’ z’ x For each subcube, write its algebraic expression using the variable name (eg. x) if the box occurs in the row/column for which the variable is 1 – otherwise, if the box occurs in the row/column for which the variable (eg. y,z) is 0, use the complemented variable (ie. y’, z’).

Karnaugh Maps 3 variable map yz x10x1 1 0 y’ z’ x Collecting literals into a product gives: xy’z’ 1-subcubes are expressed using all variable symbols

Karnaugh Maps 3 variable map yz x10x1 1 0 y+y’=1 x’ Circle all 1 entries that, taken together, form a subcube (i.e. rectangle). Generally speaking, there will be more than one independent subcube, each reflecting a different prime implicant. z

Karnaugh Maps 3 variable map yz x10x1 1 0 x’ Collecting literals into a product gives: x’z Circle all 1 entries that, taken together, form a subcube (i.e. rectangle). Generally speaking, there will be more than one independent subcube, each reflecting a different prime implicant. y+y’=1z

Karnaugh Maps 3 variable map yz x10x1 1 0 y z x+x’ = 1 Circle all 1 entries that, taken together, form a subcube (i.e. rectangle). Generally speaking, there will be more than one independent subcube, each reflecting a different prime implicant.

Karnaugh Maps 3 variable map yz x10x1 1 0 y z x+x’ = 1 Collecting literals into a product gives: yz Circle all 1 entries that, taken together, form a subcube (i.e. rectangle). Generally speaking, there will be more than one independent subcube, each reflecting a different prime implicant.

Karnaugh Maps 3 variable map yz x10x1 1 0 Each subcube (rectangle) corresponds to a prime implicant term. Gathering all terms in SOP form, f = xy’z’ + x’z + yz

Karnaugh Maps 3 variable map yz x10x1 1 0 f = xy’z’ + x’z + yz

Karnaugh Maps 3 variable map yz x10x1 1 0 f = xy’z’ + x’z + yz Each subcube contains at least one 1-cell that can ONLY be included within that subcube. Such 1-cells are called essential 1-cells and their corresponding prime implicant is called an essential prime implicant.

Karnaugh Maps 3 variable map yz x10x1 1 0 f = xy’z’ + x’z + yz xy’z’ ( xy’z’ ) Essential 1-cell (essential prime implicant). Each subcube contains at least one 1-cell that can ONLY be included within that subcube. Such 1-cells are called essential 1-cells and their corresponding prime implicant is called an essential prime implicant.

Karnaugh Maps 3 variable map yz x10x1 1 0 f = xy’z’ + x’z + yz x’y’z ( x’z ) Essential 1-cell (essential prime implicant). Each subcube contains at least one 1-cell that can ONLY be included within that subcube. Such 1-cells are called essential 1-cells and their corresponding prime implicant is called an essential prime implicant.

Karnaugh Maps 3 variable map yz x10x1 1 0 f = xy’z’ + x’z + yz xyz ( yz ) Essential 1-cell (essential prime implicant). Each subcube contains at least one 1-cell that can ONLY be included within that subcube. Such 1-cells are called essential 1-cells and their corresponding prime implicant is called an essential prime implicant.

Karnaugh Maps 3 variable map - 2nd variation yz x10x

Karnaugh Maps 3 variable map - 2nd variation yz x10x Circle all 1 entries that, taken together, form a subcube (i.e. rectangle) of the largest size, but containing 2 N squares (for all possible N).

Karnaugh Maps 3 variable map - 2nd variation yz x10x Circle all 1 entries that, taken together, form a subcube (i.e. rectangle) of the largest size, but containing 2 N squares (for all possible N).

Karnaugh Maps 3 variable map - 2nd variation yz x10x Circle all 1 entries that, taken together, form a subcube (i.e. rectangle) of the largest size, but containing 2 N squares (for all possible N). The “wrap-around” technique.

Karnaugh Maps 3 variable map - 2nd variation yz x10x x’[yz + y’z + yz’ + y’z’] = x’[(y+y’)z + (y+y’)z’] = x’[z+z’] = x’ x’y’z’+x’yz’+xy’z’+xyz’ = x’(y’+y)z’ +x(y’+y)z’ = (x’+x)(y’+y)z’ = z’ Circle all 1 entries that, taken together, form a subcube (i.e. rectangle) of the largest size, but containing 2 N squares (for all possible N).

Karnaugh Maps 3 variable map - 2nd variation yz x10x Collecting literals into a product gives: x’ + z’ Circle all 1 entries that, taken together, form a subcube (i.e. rectangle) of the largest size, but containing 2 N squares (for all possible N).

Karnaugh Maps Case Study: 4 variable map yz wx Place function values in the map positions.

Karnaugh Maps Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound.

Karnaugh Maps Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. There are no subcubes of sizes: 2 4 = 16 or 2 3 = 8.

Karnaugh Maps Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Subcubes of size: 2 2 =4.

Karnaugh Maps Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Subcubes of size: 2 2 =4.

Karnaugh Maps Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Subcubes of size: 2 1 =2.

Karnaugh Maps Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Subcubes of size: 2 1 =2.

Karnaugh Maps Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. No more subcubes!

Karnaugh Maps Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Now to identify the prime implicants: y’z’ + xy’ + x’z’ + wxz + wx’y

Karnaugh Maps Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Now to identify the prime implicants: xy’ + x’z’ + wxz + wx’y

Karnaugh Maps Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Now to identify the prime implicants: xy’ + x’z’ + wxz + wx’y

Karnaugh Maps Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Now to identify the prime implicants: xy’ + x’z’ + wxz + wx’y

Karnaugh Maps Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Now to identify the prime implicants: xy’ + x’z’ + wxz + wx’y

Karnaugh Maps Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Now to identify the prime implicants: f(w,x,y,z) = xy’ + x’z’ + wxz + wx’y

Karnaugh Maps Using the procedure of identifying the largest possible subcubes in the Karnaugh map first, then dealing with smaller sized subcubes, we arrive at minimal representations of SOP (POS) expressions for the function. These expressions may not be unique, however.

Karnaugh Maps Case Study: 4 variable map yz wx f(w,x,y,z) = xy’ + x’z’ + wxz + wx’y Previously, we had presented this example.

Karnaugh Maps Case Study: 4 variable map yz wx Consider these subcubes... f(w,x,y,z) = xy’ + x’z’ + wxz + wx’y

Karnaugh Maps Case Study: 4 variable map yz wx Now, choose the other, alternative subcube containing these 1- cells … …thereby, minimizing the number of subcubes, hence the number of product terms in the function. f(w,x,y,z) = xy’ + x’z’ + wyz + wx’y

Karnaugh Maps Case Study: 4 variable map yz wx Both solutions are equivalent, but the second one is minimal. f(w,x,y,z) = xy’ + x’z’ + wxz + wx’y f(w,x,y,z) = xy’ + x’z’ + wyz

Karnaugh Maps – Summary for SOP For a function of N variables (literals) draw the Karnaugh map consisting of 2 N cells –1x2, 2x2, 2x4, 4x4, and so on –we have not considered the cases of N=5, or 6 (See Textbook). Identify all rectangular subcubes of decreasing subcube size: 2 L cells [L=N,N-1,...,1,0], using wraparound if possible. –Always seek to minimize the degree of subcube overlap –look for essential 1-cells to identify essential prime implicants and minimize the number of subcubes For each subcube, assign a prime implicant algebraic expression term by removing from the full implicant term all literals for which both 0 and 1 row or column labels appear, that is, keep only those literals that do not change.

Karnaugh Maps - POS The Karnaugh mapping technique can also be applied to prime implicate (POS) forms.

Karnaugh Maps - POS The Karnaugh mapping technique can also be applied to prime implicate (POS) forms. Instead of grouping 1-cells, we group 0-cells.

Karnaugh Maps - POS The Karnaugh mapping technique can also be applied to prime implicate (POS) forms. Instead of grouping 1-cells, we group 0-cells. For each subcube of 0-cells we assign a sum expression, removing all literals whose row/column indices are both 0 and 1, and listing the literal itself for index label 0, or its complement for index label 1. –Review this point with respect to algebraic representations –Note the duality relationships

Karnaugh Maps - POS Case Study: 4 variable map yz wx

Karnaugh Maps - POS Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. No subcubes of sizes 16, 8 or 4.

Karnaugh Maps - POS Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Subcubes of size 2.

Karnaugh Maps - POS Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Note the essential 0-cells that denote essential prime implicates.

Karnaugh Maps - POS Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. This subcube contains 0-cells that may be associated with other subcube choices, hence they are not essential 0- cells. This choice minimizes the number of subcubes.

Karnaugh Maps - POS Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Note there are no smaller subcubes. The subcube choices reflect a minimal POS expression.

Karnaugh Maps - POS Case Study: 4 variable map yz wx Identify 2 N subcubes by decreasing N=4,3,2,1,0; using wraparound. Note there are no smaller subcubes. The subcube choices reflect a minimal POS expression. f(w,x,y,z) = (x+y+z’)(x’+y’+z)(w+y’+z’)

Karnaugh Maps Case Study: 4 variable map SOP: f(w,x,y,z) = xy’ + x’z’ + wxz –the 7 literals provide input to the and gates (operators) –the 3 terms provide input to the or gates –there are 7+3=10 gate inputs for this expression (circuit)

Karnaugh Maps Case Study: 4 variable map SOP: f(w,x,y,z) = xy’ + x’z’ + wxz –the 7 literals provide input to the and gates (operators) –the 3 terms provide input to the or gates –there are 7+3=10 gate inputs for this expression (circuit) POS: f(w,x,y,z) = (x+y+z’)(x’+y’+z)(w+y’+z’) –the 9 literals provide input to the or gates –the 3 terms provide input to the and gates –there are 9+3=12 gate inputs for this circuit

Karnaugh Maps Case Study: 4 variable map SOP: f(w,x,y,z) = xy’ + x’z’ + wxz –the 7 literals provide input to the and gates (operators) –the 3 terms provide input to the or gates –there are 7+3=10 gate inputs for this expression (circuit) POS: f(w,x,y,z) = (x+y+z’)(x’+y’+z)(w+y’+z’) –the 9 literals provide input to the or gates –the 3 terms provide input to the and gates –there are 9+3=12 gate inputs for this circuit CONCLUSION: In this case, the SOP form is a minimal cost circuit expression.

Karnaugh Maps Sometimes the logic for a circuit function is specified incompletely –Some possible inputs may not have a corresponding “fixed” output value What do we do when the client does not care about these special cases Dealing with apathetic circuit specification The case of Don’t Care Conditions

Karnaugh Maps When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token).

Karnaugh Maps When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token) yz wx

Karnaugh Maps When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token). We may treat those terms as if they are 1’s OR 0’s, whichever is more useful in leading to a minimal form of expression yz wx ? ? ?

Karnaugh Maps When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token). We may treat those terms as if they are 1’s OR 0’s, whichever is more useful in leading to a minimal form of expression yz wx

Karnaugh Maps When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token). We may treat those terms as if they are 1’s OR 0’s, whichever is more useful in leading to a minimal form of expression. Ignore all unused dc conditions yz wx

Karnaugh Maps When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token). We may treat those terms as if they are 1’s OR 0’s, whichever is more useful in leading to a minimal form of expression yz wx PRIME IMPLICATES

Karnaugh Maps When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token). We may treat those terms as if they are 1’s OR 0’s, whichever is more useful in leading to a minimal form of expression yz wx PRIME IMPLICATES

Karnaugh Maps When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token). We may treat those terms as if they are 1’s OR 0’s, whichever is more useful in leading to a minimal form of expression. Ignore all unused dc conditions yz wx PRIME IMPLICATES

Summary We have studied and developed several techniques for simplifying Boolean expressions. These are based on the axioms, definitions and theorems of the Boolean Algebra, applied through the Boolean Calculus. Powerful tabular techniques have been developed for rapid reduction to some minimal cost forms using –Karnaugh maps An even more powerful technique has been developed by Quine and McCluskey (and Petrick). Time prevents covering this topic but it is described in advanced books on computer engineering and logic design.