Slides for Lecture 5 ENEL 353: Digital Circuits Fall 203 Term Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary October, 203
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 2/20 Previous Lecture Continued presentation of K-map preliminaries: more about K-map layout relationships between minterms and K-map cells adjacency and using adjacency for simplification introduction to grouping cells into 2-cell, 4-cell, or 8-cell rectangles
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 3/20 Today s Lecture K-map terminology: implicant, prime implicant, distinguished -cell, essential prime implicant. Using K-maps to find minimal SOP expressions for functions. Related reading in Harris & Harris: Section 2.7, up to the end of Section 2.7.2.
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 4/20 Rectangles of three, six, or nine -cells are not helpful A rectangle of 2, 4, or 8 -cells corresponds to a single product in an SOP expression. A rectangle of 3, 6, or 9 -cells does not correspond to a single product in an SOP expression, and is therefore not helpful in minimization of logic functions.
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 5/20 An imprecise description of K-map minimization methods Cover all the -cells, and only the -cells. Use as few single-cell, 2-cell, 4-cell, and 8-cell rectangles as possible. Make the rectangles as large as possible. canonical SOP not quite minimal minimal SOP (far from minimal!)
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 6/20 Lead-up to an important definition: Implicant X implies Y, means, Whenever X is true, then Y must also be true. Example: The fact that Joe is in the ICT Building implies that Joe is on the U of C campus. Let s look at a typical SOP expression: F = Ā BC + ĀB C + AC Because of the way OR is defined, Ā BC = implies F =. Similarly, ĀB C = implies F =, and AC = implies F =. The products Ā BC, ĀB C, and AC are said to be implicants of F.
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 7/20 Important definition: Implicant For a given logic function F, the implicants of F are all of the products from all of the valid SOP expressions for F. For example, here is an exhaustive list of valid SOP expressions for the two-input NAND function: F = Ā B + ĀB + A B = Ā + S B = ĀB + B = Ā + B So what are all the implicants of this particular F?
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 8/20 Implicants and K-maps From a K-map for a function F, the implicants of F correspond to all of the individual -cells; all rectangles composed of 2, 4, or 8 -cells. (That s for functions of up to four variables things get more complicated with functions of five or six variables.) Example : Let s use a K-map to find all the implicants of NAND (A,B). Example 2: Let s work with an example 4-variable K-map, and find a few implicants and SOP expressions.
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 9/20 Important definition: Prime implicant A prime implicant is an implicant that is not fully contained by any other implicant. Example: If ABC and AB C are both implicants of F, they cannot be prime implicants, because they are fully contained by AB. In a K-map, a prime implicant is a rectangle that cannot be doubled in size without collecting one or more 0-cells.
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 0/20 Illustration of prime and non-prime implicants Examples, for a 3-variable function and a 4-variable function... non-prime implicants prime implicants
ENEL 353 F3 Section 02 Slides for Lecture 5 slide /20 Illustration of prime and non-prime implicants, continued A B C D C 00 0 A 00 0 0 D The circled implicant is a prime implicant because it can t be doubled in size without collecting a 0-cell. What is the product for the circled implicant? 0 B What are all the other prime implicants?
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 2/20 The prime implicant theorem The theorem says: The products in a minimal SOP expression must all be prime implicants. Sketch of proof: Suppose an SOP expression for F includes non-prime implicant X. Replace X with a prime implicant that fully contains X. The resulting new SOP expression is valid for F and is simpler than the original SOP expression, so the original expression could not have been minimal. Practical consequence: When you use a K-map to look for a minimal SOP expression, you should totally ignore non-prime implicants.
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 3/20 What the prime implicant theorem does not say This is not generally true: An SOP expression for F in which the products are prime implicants is a minimal SOP expression for F. Example: Let s study this K-map... A B C 00 0 A 0 0 C B
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 4/20 Important definitions: Distinguished -cell and essential prime implicant A distinguished -cell of function F is a -cell that is covered by exactly one prime implicant of F. An essential prime implicant of F is a prime implicant that covers at least one distinguished -cell of F. A B C 00 0 A 0 Let s study this K-map some more... 0 C B
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 5/20 Distinguished -cells, essential prime implicants, and this year s textbook Harris and Harris do not provide definitions of distinguished -cell or essential prime implicant. However, both concepts are useful for efficient discovery of minimal SOP expressions from K-maps, so in ENEL 353 you must know exactly what these terms mean. (Many other textbooks define distinguished -cell and essential prime implicant exactly as done on the previous slide.)
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 6/20 Essential prime implicants and minimal SOP expressions Fact: If the essential prime implicants of F cover all of its -cells, the OR of the essential prime implicants is a unique minimal SOP expression for F. Sketch of proof: The minimal SOP expression must be a sum of prime implicants. If an essential prime implicant is not used in a sum of prime implicants, at least one -cell is not covered, so no essential prime implicant can be left out. Important consequence: Finally, for at least some functions, we have a way to be certain that an SOP expression is a minimal SOP expression!
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 7/20 Review of an earlier example A B C D C 00 0 0 A 00 0 0 D Which prime implicants are essential prime implicants? Can we use the essential prime implicants to make a minimal SOP expression? B
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 8/20 Using only essential prime implicants may fail to cover all the -cells Unfortunately, when looking for minimal SOP expressions, we can t always declare victory after we find all the essential prime implicants. Let s look at this example... A B C D 00 A 00 0 0 0 D C 0 B
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 9/20 A note about non-essential prime implicants We ve just seen that prime implicants in a K-map can be divided into those that are essential prime implicants and those that are not essential prime implicants. To call a prime implicant non-essential does not mean that it is useless or unimportant! Here is the correct distinction... essential PI: contains a distinguished -cell, must appear in a minimal SOP expression non-essential PI: does not contain a distinguished -cell, might or might not be needed in a minimal SOP expression
ENEL 353 F3 Section 02 Slides for Lecture 5 slide 20/20 Upcoming topics Finding minimal SOP expressions when essential prime implicants do not cover all the -cells. (Not covered in detail in Harris & Harris.) Don t-cares, X-cells, and SOP minimization. (Related reading in Harris & Harris: Section 2.7.3.)