Objectives Unit 2 Session - 6 Combinational Logic Circuits Draw 3- variable and 4- variable Karnaugh maps and use them to simplify Boolean expressions Understand don t Care Conditions Use the Product-of-Sums Method to design a logic circuit based on a design truth table Perform conversion between SOP and POS 3 - Variable Karnaugh Map Consider a logic equation Y = f(a, B, C). We have 8 fundamental products or minterms as shown below. We need to arrange them so that they are adjacent. A B C Minterms 0 0 0 A B C m 0 0 0 1 A B C m 1 0 1 0 A BC m 2 0 1 1 A BC m 3 1 0 0 AB C m 4 1 0 1 AB C m 5 1 1 0 ABC m 6 1 1 1 ABC m 7 Adjacent terms differ in the values of only one variable. A given 3-variable minterm will have 3 adjacent terms. Example: 3 adjacent terms of minterm ABC are: A BC, AB C, ABC We use Gray code to position the minterms. In Gray code, consecutive codes differ in one variable only. B. S. Umashankar, BNMIT Page 1
3- bit Gray Code The 3-bit Gray code is tabulated below: G 2 G 1 G 0 0 0 0 0 0 1 0 1 1 0 1 0 1 1 0 1 1 1 1 0 1 1 0 0 The 3 - variable Karnaugh map is drawn as shown making use of the Gray code. 3- Variable K-map Simplification Example 1: Consider Y = f(a, B, C) = Σ m (2, 3, 4, 6) = A BC + A BC + AB C + ABC The Karnaugh map for the given logic expression is drawn as shown below: The simplified expression Y = A B + AC B. S. Umashankar, BNMIT Page 2
Example 2: Simplify Y = f(a, B, C) =Σ m (0, 2, 4, 6). The Karnaugh map for the given logic expression is drawn as shown below: The simplified expression is Y= C. Example 3: Simplify Y = f(a, B, C) =Σ m (1, 2, 3, 5, 6, 7) The Karnaugh map for the given logic expression is drawn as shown below: The simplified expression Y= B + C. B. S. Umashankar, BNMIT Page 3
4 Variable Karnaugh Map Consider a logic equation Y = f(a, B, C,D). We have 16 fundamental products or minterms and they are arranged so that they are adjacent (4-bit Gray code is used). 4-Variable K-map Simplification Example 1: Simplify Y = f(a, B, C, D) = Σ m (1, 2, 3, 6, 8, 9, 10, 12, 13, 14). The simplified Boolean equation is Y = A B D + AC + CD. B. S. Umashankar, BNMIT Page 4
Example 2: Simplify Y = Σ m (0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13). The simplified equation is Y = C + A D + B D. Example 3: Simplify Y = Σ m (3, 4, 5, 7, 9, 13, 14, 15). Note that the quad covering minterms 5, 7, 13, and 15 is not a prime implicant. We cover the minterms as shown: B. S. Umashankar, BNMIT Page 5
The simplified logic equation is Y = A BC + A CD + AC D + ABC. Don t Care Conditions In some digital systems, certain inputs conditions never occur. The output for the invalid inputs is not defined and it is indicated by an X in the truth table. The X is called a don t care condition. X can be considered to be either 0 or 1, whichever produces a simpler logic circuit. Example: Truth Table with Don t Care Conditions A B C Y 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 X 1 1 0 X 1 1 1 X From the truth table, we have Y = Σ m(1, 3) + d(5, 6, 7). B. S. Umashankar, BNMIT Page 6
K-map Simplification with Don t Care Conditions Consider simplification of the K-map shown below: The don t care terms 5 and 7 are included in the quad cover since they help if greater simplification. The don t care term 6 does not help in simplification and is ignored. The simplified equation is Y = C. Example 2: Obtain the simplified logic equation for the given K-map below: The simplified logic equation is Y = A + C. Product-of-Sums Method The solution from the product-of-sums method results in an OR-AND or NOR-NOR network as shown below. OR-AND network B. S. Umashankar, BNMIT Page 7
NOR-NOR network Sum term A sum term is a disjunction of literals, where each literal is either a Boolean variable or its complement. Examples: A + B A + B + C A Fundamental Sum or Maxterm For a function of n variables, a sum term in which each of the n variables uncomplemented or complemented form) is called a fundamental sum or Maxterm. appears once (in Fundamental Sums for Two inputs A Inputs B Fundamental sums or Maxterms 0 0 1 1 0 M 0 = A + B 1 M 1 = A + B 0 M 2 = A + B 1 M 3 = A + B Product-of-Sums (POS) Equation Given the truth table, we identify the fundamental sums or Maxterms. Then by ANDing these sums, we get the Product-of-Sums (POS) equation. Note that the fundamental sum produces an output 0. B. S. Umashankar, BNMIT Page 8
Inputs Output A B Y 0 0 0 0 1 0 1 0 0 1 1 1 From the above truth table we have Y = (A + B).(A + B ).(A + B) = M 0.M 1.M 2 In compact form Y = f(a, B, C) = πm(0, 1, 2). The logic circuit is as shown below: OR-AND network The expression can be further simplified. Consider K-map simplification. We obtain the simplified expression as Y = A. B and it is realized by a simple AND gate as shown below: B. S. Umashankar, BNMIT Page 9
Canonical Product-of-Sums Form Consider Y = f(a, B) = (A + B).(A + B ).(A + B). It is in canonical POS form. If each sum term is a maxterm, then the expression is said to be in a canonical product- of-sums form or standard POS form. POS Simplification Example: Reduce the following function using Karnaugh map technique f(a, B, C, D) = πm(0, 2, 4, 10, 11, 14, 15) The K-map for the given logic function is drawn as shown below: The simplified logic equation in POS form is Y = (A + B + D). (A + C + D). (A + C ). Conversion between SOP and POS SOP and POS occupy complementary locations in a truth table. One representation can be obtained by the other by Example: 1. Identifying complementary locations 2. Changing minterm to maxterm or reverse 3. Changing summation by product or reverse Consider Y = f(a, B, C) = πm(0, 3, 6). The SOP equivalent is Y= Σm(1, 2, 4, 5, 7). B. S. Umashankar, BNMIT Page 10
Questions 1. Simplify the following logic expression using Karnaugh map method. i) f(a,b,c,d) = m (1, 2, 8, 9, 10, 12, 13, 14) ii) f(p, Q, R, S) = m (1, 2, 8, 9, 10, 12, 13, 14) 2. Using Karnaugh map simplify the following Boolean expression and give the implementation of the same using: i) NAND gates only (SOP form) ii) NOR gates only (POS form) f(a,b,c,d) = m (0, 1, 2, 4, 5, 12, 14)+dc(8, 10). 3. Simplify the following logic equation using Karnaugh map and give the implementation of the simplified expression: f(a,b,c,d) = m (7) + d(10, 11, 12, 13, 14, 15) 4. Simplify the following Boolean function by using K-map method in POS form: f(a,b,c,d) = m (0, 1, 2, 3, 4, 5, 7) 5. Simplify the following using K-map: f(a,b,c,d) = A B C + AD + BD + CD + AC + A B 6. Simplify the following using K-map and design it by using NAND gates (use only four gates): f = w xz + w yz + x yz + wxy z; d = wyz B. S. Umashankar, BNMIT Page 11