VIEWS: 9,622 PAGES: 27 CATEGORY: Algebra POSTED ON: 1/22/2009 Public Domain
Presentation on K-maps Submitted by :Lovish bajaj Karnaugh maps Graphical method for simplification of boolean expression. It is a graphical chart which contain boxes. The information contained in truth table or available in SOP or POS form is represented in k-map. K-maps can be written for 2,3,4…. Upto 6 variables . Beyond that the technique becomes very cumbersome. K-map structure 2- variable k-map : B • A two variable k-map consist of 4 boxes. • A and B are two input variables. 0 A 0 1 0 2 1 1 3 • 0 and 1 are the value of A or B. 3- variable k-map : A B The sequence follows gray code and not the binary. C 00 0 0 1 01 11 1 0 • The three variable k-map consist of 8 boxes. • A , B and C are the three variables . 2 6 4 1 3 7 5 4 - variable k-map : A B C D 00 0 • Four variable k- map 4 5 7 6 12 13 15 14 8 9 11 10 0 0 0 1 1 1 1 0 consist of sixteen boxes. • It has four variables A,B,C&D. 01 1 3 2 11 10 PLOTTING A K-MAP • Whenever a k-map is to be practically used for simplification, the entries inside the boxes are to be done from given truth table. • For example :A B 0 1 A 0 0 1 1 B 0 1 0 1 Y 0 0 0 1 1 0 0 0 0 2 0 1 1 3 A & B are the input variables Output value of Y is entered into the boxes Representation of standard SOP form on the k-maps:• The logical expression in standard SOP form can be represented on k-map by simply entering 1’s in the boxes of the k-map corresponding to each minterm present in the equation. • The remaining boxes are to be filled with zero. • For example :A B Q. Draw k- map for the following expression : C 00 01 11 1 0 1 0 0 2 1 6 1 4 Y= m 0,1,4,6,7 1 0 1 3 1 7 0 5 Representation of standard POS form on k-map:• Logical expressions in the standard POS form can be represented on k-map by entering 0’s in the boxes of k-map corresponding to each maxterm present in the given equation • The remaining boxes are filled with one. • For example :- Q. Draw k-map for following expression: 00 01 11 1 0 M 0,2,6 0 0 0 2 0 6 1 4 1 1 1 3 1 7 1 5 How does simplification takes place ? • Once we plot the logic function or truth table on a k-map , we have to use the grouping technique for simplifying the logic function. • Grouping means combining the terms in the adjacent boxes. • Grouping of adjacent 1’s is done for simplification of SOP form. • Grouping of adjacent 0’s is done for simplification of POS form. Way of grouping • The grouping follows the binary rule i.e. we can group 1,2,,4,8,16,32… number of 1’s or 0’s. We cannot group 3,5,7,9…. Number of 1’s or 0’s. • Pairs : A group of adjacent 1’s or 0’s is called a pair. • Quad : A group of four adjacent 1’s or 0’s is called a quad. • Octet : A group of eight adjacent 1’s or 0’s is called a octet. Grouping of two adjacent I’s (pair): A B ABC’ A’B’ A’B 0 0 AB 1 0 AB’C’ AB’ 1 0 C C’ C 0 0 SIMPLIFICATION :Y = ABC’ + AB’C’ = AC’(B + B’) = AC’ …. Since (B+B’) = 1 Conclusion :- By pairing two adjacent 1’s we can eliminate one variable. A’B A B C Simplification:Y = A’BC’ + A’BC = A’B(C’ + C) = A’B …. SINCE C’+C = 1 C’ C A’B’ 0 A’B 1 AB 0 AB’ 0 0 1 0 0 A B C Simplification:Y = A’B’C + AB’C = B’C(A’ + A) = B’C …. SINCE A’+A = 1 C’ C A’B’ 0 1 A’B 0 0 AB 0 0 AB’ 0 1 Conclusion :- By pairing two adjacent 1’s we can eliminate one variable. B’C Grouping of four adjacent I’s (quad.) • If we group four 1’s from the adjacent cells of k-map then the group is called a quad. • After forming a quad , the simplification takes place in such a way that the two variables which are not same will be eliminated . • Thus quad will eliminate two variables. For eg:• The two variables which are same in all minterms are C and D’ . • The variables which are not same in all variables are A and B . A B C D A’B’ C’D’ C’D CD 0 0 0 1 A’B 0 0 0 1 AB 0 0 0 1 AB’ 0 0 0 1 • A and B will be eliminated and the output will be : Y = C D’ Simplification :- CD’ Y = CD’ Y = A’B’CD’ + A’BCD’ + ABCD’ + AB’CD’ = CD’ ( A’B’ + A’B + AB + AB’ ) = CD’ *A’(B’+B) + A(B+B’)+ = CD’*A+A’+ = CD’ ……Proved. Conclusion:Two variables are eliminated Top and bottom 1’s forming a quad Four adjacent 1’s forming a square. A B C D C’D’ C’D CD A B A’B’ 0 0 0 0 A’B 1 0 0 1 AB 1 0 0 1 AB’ 0 0 0 0 C D C’D’ C’D CD A’B’ 0 1 1 0 A’B 0 1 1 0 AB 0 0 0 0 AB’ 0 0 0 0 CD’ CD’ Y = BD’ Y = A’D A and C are changing so they are eliminated B and C are changing so they are eliminated 1’s corresponding to the corners A B C D A’B’ 1 A’B 0 0 0 0 AB 0 0 0 0 AB’ 1 0 0 1 C’D’ C’D CD 0 0 1 CD’ Y = B’D’ ( A and C are eliminated ) Grouping of eight adjacent 1’s(octet):• A group of eight adjacent 1’s is called octet. • When an octet is formed three variables will change and only one variable will remain same in all minterms . • The three variables which will change will be eliminated and which does not change wil appear as output. A B C D A’B’ Simplification:C’D’ C’D Y = A’B’C’D’ + A’B’C’D + A’B’CD + A’B’CD’ + A’BC’D’ + A’BC’D + A’BCD + A’BCD’ CD 1 1 1 1 A’B 1 1 1 1 AB 0 0 0 0 AB’ 0 0 0 0 = A’B’C’ ( D+D’ ) + A’B’C ( D + D’ ) + A’BC’ ( D’+D ) + A’BC ( D + D’ ) = A’B’ ( C+C’ ) + A’B ( C’ + C ) = A’ ( B + B’ ) = A’ CD’ Y = A’ THREE VARIABLES ARE ELIMINATED Leftmost and the rightmost forming a octet A B C D A’B’ 1 C’D’ C’D 1 0 0 1 A’B 0 AB 0 AB’ 1 CD CD’ 1 1 0 0 0 0 1 1 Y = B’ Minimization of SOP expressions :Minimization procedure:Step 1 :- Prepare the k-map and place 1’s according to the given truth table or logical expressions. Fill the remaining cells with 0’s. Step 2:- Locate the isolated I’s i.e. the 1’s which are not combined with other . Step 3:- Identify the 1’s which can be combined to form a pair in only one way and then encircle them. Step 4:- Identify the 1’s which can be combined to form a quad in only one way and encircle them. Step 5:- Identify the 1’s which can be combined to form an octet in only one way and encircle them. Step 6:- after identifying the pairs, quads and octets ,check whether if any one is yet their to be encircled. If yes then encircle them with each other o rwith already encircled 1’s (by means of overlapping). The number of groups should be minimum. For eg:Solve the expression Y = m(0,1,2,5,13,15). • Prepare the k-map and place 1’s and 0’s at their positions. A B C D Pair 2:A’BC’ A’B’ 1 0 0 0 CD’ Pair 3: BCD A’B 1 1 1 0 AB 0 0 1 0 Pair 1: B’C’D’ AB’ 1 0 0 0 As there are no isolated 1’s , quads and octets so the minimized expression is : C’D’ C’D CD Y = B’C’D’ + A’BC’ + BCD Don’t care conditions:- ( ) • For SOP form we enter 1’s corresponding to the combinations of the input variables which produce the high input. And we enter 0’s for the remaining cells of k-map. • For POS form we enter 0’s corresponding to the combinations of the input variables which produce the high input. And we enter 1’s for the remaining cells of k-map. • But it is not always true that the cells not containing 1’s (in SOP) will contain 0’s some combination of input variables do not occur . • Also for some functions the outputs corresponding to certain combinations of input variables do not matter • In such conditions we have freedom to assume a 0 or 1 as output for each of these combination • These conditions are known as don’t care conditions in k-map and in k- map is represented with a cross mark in the corresponding cell. The don’t care condition () may be assumed to be 0 or 1 as per the need of simplification . e.g. :Simplify the k-map :Y = m (1,3,7,11,15) + d(0,2,5) C D A B A’B’ C’D’ 0 0 0 CD’ Y = AB A’B 1 AB 1 1 1 1 AB’ Y = C’D’ Don’t care conditions are treated as 1’s . 0 0 0 C’D CD 1 0