You are on page 1of 14

# K Map

Electronics

Saurabh Khandelwal

Product-of-sum form (POS)  first the sum (OR)  then the products are taken (AND)  Example: (A+B+C) (D+E+F) (G+H+I) Here the sum terms are defined by using the OR operation and the product term is defined by using AND operation. Theorem 2: The complement of the product of two or more variables is equal to the sum of the complement of the variables. “It is possible to convert between these two forms using Boolean algebra (DeMorgan’s)” DeMorgan s’ Theorems: Theorem 1: The complement of the sum of two or more variables is equal to the product of the complement of the variables.𝑩 𝑨. 𝑩 = 𝑨 + 𝑩 Saurabh Khandelwal Page 2 . For the two variable A and B. 𝑨 + 𝑩 = 𝑨.Sum-of-products form (SOP)  First the product (AND)  Then these are summed (OR)  Example: ABC + DEF + GHI Here the product terms are defined by using the AND operation and the sum term is defined by using OR operation.

f (A. 𝑨 + 𝑩 = 𝑨. Example: f (A. where X is the name of the missing variable. D) = AB𝐶 D + A𝐵CD + A𝐵C𝐷 An SOP expression can be forced into canonical form by ANDing the incomplete terms with terms of the form X +𝑋. B. B.𝑩 𝑨. every variable appears in every term. C) = AB + BC = AB (C + 𝐶 ) + (A + 𝐴) BC = ABC + AB𝐶 + ABC + 𝐴BC = ABC + AB𝐶 + 𝐴BC The product term in a canonical SOP expression is called a 'minterm' Saurabh Khandelwal Page 3 . 𝑩 = 𝑨 + 𝑩 Canonical Form: In an expression in canonical form. C.

Product of Maxterms: A Boolean function can be represented algebraically from a given truth table by forming the logical product of all the maxterms that produce a 0 in the function. It has the value of 1 for that combination and 0 for the others. is called a maxterm. and uncomplemented if it is 0. A minterm. A shorthand notation:. where 0 ≤ i < 2n. and uncomplemented if it is 1. 0-minterms = minterms for which the function F = 0.  A minterm represents exactly one combination of the binary variables in a truth table (true or inverted. This expression is called a product of maxterms. is a product (AND) of the n variables in which each variable is complemented if the value assigned to it is 0. where 0 ≤ i < 2n .Minterm:  A product term in which all the variables appear exactly once. is a sum (OR) of the n variables (literals) in which each variable is complemented if the value assigned to it is 1. but not both). is called a minterm. This expression is called a sum of minterms. denoted as mi. 1-minterms = minterms for which the function F = 1. but not both). either complemented or uncomplemented. A maxterm.  A maxterm represents exactly one combination of the binary variables in a truth table (true or inverted. either complemented or uncomplemented. It has the value of 0 for that combination and 1 for the others. Sum of Minterm: A Boolean function can be represented algebraically from a given truth table by forming the logical sum of all the minterms that produce a 1 in the function. Saurabh Khandelwal Page 4 . F (list of variables) = Σ (list of 1-minterm indices) Or F'(list of variables) = Σ (list of 0-minterm indices) Maxterm:  A sum term in which all the variables appear exactly once. denoted as Mi.

1. 2. A Minterm is a product (AND) term containing all input variables of the function in either true or complemented form. 0-maxterms = maxterms for which the function F = 0. Z = 𝑨B𝑪 + 𝑨BC + A𝑩C + ABC TRUTH TABLE: A B C Z Minterm Assume all i/p = 1. and as a true form A if it appears as a 1 in the row. 1-maxterms = maxterms for which the function F = 1. The canonical form is obtained by taking the sum (OR) of the minterm of the rows where a 1 appears in the output. A variable appears in complemented form 𝐴 if it is a 0 in the row of the truth-table. 𝐴 = 𝐵 = 𝐶 = 0 0 0 0 0 0 0 1 0 0 1 0 1 𝑨B𝑪 0 1 1 1 𝑨BC 1 0 0 0 1 0 1 1 A𝑩C 1 1 0 0 1 1 1 1 ABC Saurabh Khandelwal Page 5 . F (list of variables) = Π (list of 0-maxterm indices) Or F’ (list of variables) = Π (list of 1-maxterm indices) Canonical Sum of Products Form: There are 2 steps to derive the Canonical Sum of Products Form from its truth table.

 Each term has a minimal number of literals. Consider the following arrangements of cells: Saurabh Khandelwal Page 6 . We can re-arrange these minterms into a Karnaugh map. The K-map can be easily used for circuits with 2. or 4 inputs. 3. each representing a possible combination of inputs. Karnaugh Map: A K – map is a modified form of a truth table in which arrangement of combinations is particularly convent for minimization. neighboring bit patterns are nearly the same. A graphical technique for simplifying an expression into a minimal sum of products (MSP) form:  There are a minimal number of product terms in the expression. (In other words.  The cells are arranged to that each cell’s input combination differs from adjacent cells by only a single bit.  The function value associated with a particular combination is entered in the corresponding cell.Re-arranging the Truth Table: A two-variable function has four possible minterms. differing by only 1 bit).  This is called Gray code ordering – it ensures that physical neighbors are the arrays are logical neighbors as well. It consists of an array of cells.

Variables input: b) 3 – Variables input: c) 4 – Variables input: AB CD 00 01 11 10 00 0 4 12 8 01 1 5 13 9 11 3 7 15 11 10 2 6 14 10 If there are two neighboring 1's in the grid. it means that the input bit change between the two cells has no effect on the output. This leads to a basic strategy.Location of Min-terms in K-maps: a) 2 . and thus there is redundancy. Saurabh Khandelwal Page 7 .

8 etc cells. 4. Group must contain 2n cells.e. i. Group may be horizontal or vertical. Saurabh Khandelwal Page 8 . 3. Each group should be as large as possible resulting in as few groups as possible. 1. 5. 4.Rules for grouping: 1. 2. Each cell containing a ONE must be part of a group if possible. Groups may not include any cell containing a ZERO. but not diagonal. 2.

7. then the complemented form A is in the product term. then it is not in the product term. (that means 𝐴)  If A is a variable that has value 1 in all of the squares in the grouping. Saurabh Khandelwal Page 9 . The leftmost cell in a row may be grouped with the rightmost cell and the top cell in a column may be grouped with the bottom cell. 6. Group my overlap.  If A is a variable that has value 0 for some squares in the grouping and value 1 for others. then the true form A is in the product term. Obtaining Product Terms  If A is a variable that has value 0 in all of the squares in the grouping. Group may wrap around the table.

14. w x y z f For simplification we can write 0 0 0 0 1 binary number of given cell also that 0 0 0 1 0 means binary number of. f (w. 0 0 1 0 0 7 = 0111. we write out Boolean expressions for each group. x. y z) = ∑(0. leaving out the redundant elements. x. 4 = 0100. 0 0 1 1 0 15 = 1111 0 1 0 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 1 1 Remember 1 0 0 0 1 Only given cell number 1 0 0 1 1 output is 1 other output is 0. 15) Solution: Step 1: Construct a truth table. The multiplexer example. 8. 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 Saurabh Khandelwal Page 10 . Here total number of variable is 4 so possible numbers of cells is 24 = 16 cells. 4. in which output of table is 1 at given number. 6. with two groups. 7. Example 1: Simplify the following expression using K – map for 4 – variables w. Applying this to the multiplexer example: So. y and z. gives us two terms. 9.

11 0 1 1 0 OR Remember the location of cell (mention 10 0 1 1 0 above) Step 3: Mark grouping for simplification (remember the rules of grouping) wx 00 10 01 11 yz 1 1 00 1 0 0 01 0 0 1 Group 3 11 0 1 1 0 1 10 0 1 0 Group 1 Group 2 Step 4: Evaluate each group individual. so we write x here (value of w is change from 0 to 1 so leave it) and in row value of y is does not change and its value is 1 so we write y here (value of z change from 1 to 0 so leave it. In group 1 yz value is 0 and this value is not change so we write 𝑦𝑧 and value of w is 0 (first 00 and 01 means w is not change) and its value is not change but value of x is change from 0 to 1 so we use only 𝑤 . wx Hint 00 01 11 10 yz Our function is in wxyz parameter. in column value of x is does not change and its value is 1.Step 2: Draw the K – map cells. So group 2 is xy Saurabh Khandelwal Page 11 . 00 1 1 0 1 wx = 00 and yz = 00 means 1 wx = 10 and yz = 00 means 1 wx = 11 and yz = 10 means 1 01 0 0 0 1 Similarly construct this K – map. if variable is change then leave this variable. So group 1 is 𝒘𝒚𝒛 Similarly in group 2. other parameter is 0. Check which variable is not changing in group and write it.

y z) = ∑(1. 6. x. yz 00 0 0 1 0 Group 1 1 1 1 01 0 1 Group 5 11 0 1 1 1 Group 2 10 0 0 0 Group 3 Saurabh Khandelwal Page 12 . x. So group 3 is w𝒙𝒚 wx 00 10 01 11 yz 1 1 00 1 0 0 01 0 0 1 w𝒙𝒚 11 0 1 1 0 1 10 0 1 0 𝒘𝒚𝒛 xy Step 5: Add all the value and write final expression for answer. 7. 13. 12. y. y and z. f (w. wx 11 Group 5 is cover by all 00 01 10 other groups. 11. z) = 𝒘𝒚𝒛 + xy + w𝒙𝒚 Example 2: Simplify the following expression using K – map for 4 – variables w. 5. wx value is 10 and its not change so we use w𝑥 and value of y is not change and its value is 0 so we use 𝑦. 15) Solution: Group 4 Total number of group is 5.Similarly for group 3. f (w. x.

y. wx 11 00 01 10 yz 00 0 0 1 0 wx𝑦 1 1 1 01 0 𝑥𝑧 1 1 11 0 1 1 wyz 10 0 0 0 𝑤xy 𝑤 𝑦z f (w. x. z) = xz + 𝒘𝒚z + wx𝒚 + 𝒘xy + wyz Example 3: Saurabh Khandelwal Page 13 .

Example 4: Binary Number System: (Remember) Decimal pattern 0 1 2 3 4 5 6 7 Binary number 0000 0001 0010 0011 0100 0101 0110 0111 Decimal pattern 8 9 10 11 12 13 14 15 Binary number 1000 1001 1010 1011 1100 1101 1110 1111 Saurabh Khandelwal Page 14 .