BOOLENA ALGEBRA AND LOGIC GATES
Chapter 4 Minimization Techniques Page
K- map For POS Expression
4.7.2 Plotting a K-map
We know that logic function can be represented in various forms such as SOP expression, POS expression or truth table. In this section, we will see the procedure of filling cells with binary values 1 or 0 for a given expression or truth table.
Plotting Standard SOP on K-map
Boolean expressions in SOP may or may not be in a standard form. First, the expression is converted into standard SOP and then, 1’s are marked in each cell corresponding to the minterm of expression and remaining cells are filled with 0’s. This is illustrated in the following example. Consider the Boolean function:
Page 208 Minimization Techniques Chapter 4
Digital Electronics by Ashish Murolia and RK Kanodia For More Details visit www.nodia.co.in The K-map representation is shown as shown in Figure 4.7.7. To
represent standard POS on K-map place a 0 in each cell corresponding to the max term which are present in the function. Place 1 in remaining cells.
Plotting a Truth Table on K-map
We can construct a K-map from a given truth table also. In case of SOP K-map, the product terms which are having output 1, have the corresponding cells marked with 1’s. The other cells are marked with 0’s.
In case of POS K-map, the product terms which are having output 1, have the corresponding cells marked with 0’s. The other cells are marked with 1.
For example, minterm K-map for a truth Table 4.7.1 and maxterm K-map for an another truth Table 4.7.2 are shown as below.
Table 4.7.1: A truth table and corresponding SOP K-map
Inputs Output A B C Y 0 0 0 1 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1
Table 4.7.2: A truth table and corresponding POS K-map
Inputs Output A B C Y 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 0 1 1 1 1 DO REMEMBER
The output column of a truth table is represented by 0’s or 1’s, 0 indicates that the particular minterm (product term) is not presented in the given function and 1 indicates that the minterm appears in the function.
Chapter 4 Minimization Techniques Page 209
EXAMPLE 4.13
Represent the following Boolean function by K-map:
, , ,
F A B C D_ i =ABC+BCD+BD
SOLUTION :
Given Boolean expression is
, , ,
F A B C D_ i =ABC+BCD+BD
It is a four variable Boolean expression is SOP. Variable D is missing in the first term, variable A in the second term, and variables A and
C are missing in the last term. The expression is not in a standard form. The standard SOP can be obtained by ANDing the first term with _D+Di, the second term with _A+Ai, and the last term with
A+A
_ i and _C+Ci.
, , ,
F A B C D_ i=ABC D_ +Di+BCD A_ +Ai+BD A_ +A Ci_ +Ci ABCD ABCD ABCD A BCD ABCD
= + + + +
+ABCD+ABC D+ABC D
Binary values of minterms present in the function are as follows:
A BCD 0011_ i =m3 ABC D 0101_ i =m5 ABCD 0111_ i =m7 ABCD 1011_ i =m11 ABCD 1110_ i =m14 ABC D 1101_ i =m13 ABCD 1111_ i =m15
K-map representation of the expression is shown in figure in right side. In K-map we place a 1 in each cell represented by above minterms and 0 in remaining cells.
EXAMPLE 4.14
Represent the following Boolean expression by K-map:
, , ,
Y A B C D_ i =_A+ +B C Ai_ + +C Di
SOLUTION :
Given Boolean expression is
, , ,
Y A B C D_ i =_A+ +B C Ai_ + +C Di
It is a four variable Boolean expression in POS. Variable D is missing in the first term, B is missing in the second term, and the expression is not a standard POS. The standard POS can be obtained by ORing the first term with DD and the second term with BB.
, , ,
Y A B C D_ i=_A+ + +B C DD Ai_ + +C D+BBi
A B C D A B C D A B C D
Chapter 4 Minimization Techniques Page 211
The simplification of logical functions with K-map is based on the principle of combining terms in adjacent cells. Two cells are said to be adjacent, if they differ in only one variable. Four cells are said to be adjacent, if they differ in two variables. Eight cells are said to be adjacent, if they differ in three variables, and so on. To simplify a Boolean expression, the method is as below:
The simplified SOP is obtained by grouping adjacent 1’s and the simplified POS is obtained by grouping adjacent 0’s.
First we discuss the grouping for SOP expression i.e., grouping of adjacent 1’s in the K-map. Remember that grouping of adjacent 0’s for POS expression is also same, only the form of expression changes.
Grouping of Two adjacent Cells (Pair)
Two cells are said to be adjacent if they differ in only one variable. In a pair, one variable appears in normal form in one cell and it appears in complemented form in another cell. These two terms can be grouped to give a resultant that eliminates the variable which appears in both forms. The rule used here is AX+AX=A.
Hence, by grouping a pair of adjacent 1’s in a K-map we can eliminate the variable that appears in normal and complemented form.
Now, we will consider some examples for combining two adjacent cells and obtain the resultant term after grouping.
2-variable K-map
(a) The K-map shown in Figure 4.7.7, contains a pair of 1’s that are horizontally adjacent to each other, the first cell represents AB
and second cell represents AB. Note that in these two terms, the variable A appears in both normal and complement form (B remains unchanged). These two terms can be grouped to give a resultant that eliminates the variable A, since it appears in both forms.
f =A B+AB =B A_ +Ai=B _A+A=1i
(b) Now, the K-map shown in Figure 4.7.8, contains a pair of 1’s that are vertically adjacent to each other, the first cell represents AB
and second cell represents AB. Note that in these two terms, the variable B appears in both normal and complement form (A remains unchanged). These two terms can be grouped to give a resultant that eliminates the variable B, since it appears in both forms.
f =A B+AB =A B_ +Bi=A _B+B=1i
3-variable K-map
(a) The 3-variable K-map shown in Figure 4.7.9 contains a pair of 1’s that are horizontally adjacent to each other, the first cell represents
ABC and second cell represents AB C. Note that in these two terms, only the variable B appears in both normal and complement form (A
and C remain unchanged). These two terms can be grouped to give a resultant that eliminates the variable B, since it appears in both forms.
Figure 4.7.7:
Figure 4.7.8:
Page 212 Minimization Techniques Chapter 4
Digital Electronics by Ashish Murolia and RK Kanodia For More Details visit www.nodia.co.in f =ABC+AB C =AC B^ +Bh =AC 1^ h =AC
(b) The same principle holds true for any pair of vertically (or) horizontally adjacent 1’s. Figure 4.7.10 shows an example of two vertically adjacent 1’s. The first cell represents ABC and second cell represents ABC. These two cells can be grouped and the variable
C is eliminated, since it appears in both its uncomplemented and complemented form
f =ABC+ABC =AB C^ +Ch =AB 1^ h =AB
(c) In a K-map the left most column and right most column of squares are considered to be adjacent. Thus, the two 1’s in these columns with a common row can be combined to eliminate one variable. This is illustrated in the Figure 4.7.11. The left most column cell represents
A B C and right most column cell represents ABC Here the variable
A has appeared in both its complemented and uncomplemented forms and hence it is eliminated
f =A BC+ABC =BC A^ +Ah =BC 1^ h =BC
(d) Now consider the example of K-map that has two overlapping pairs of 1’s. This shows that one cell can be shared between two pairs as shown in Figure 4.7.12. f =A B C+A BC+A BC+ABC A C B B AB C C = _ + i+ _ + i A C AB = + 4-variable K-map
Now we consider the possible grouping of pairs in a 4-variable K-maps. 1. Two horizontal adjacent cells (Figure 4.7.13)
2. Two vertical adjacent cells (Figure 4.7.14)
3. Any two cells of first and last rows and belong to same column (Figure 4.7.15)
4. Any two cells of first and last columns and belong to same row (Figure 4.7.15). Figure 4.7.10: Figure 4.7.11: Figure 4.7.12: Figure 4.7.14 Y =ABC D+ABC D =BC D A_ +Ai =BC D Figure 4.7.15 Y =ABC D+ABCD =ABD C_ +Ci =ABD Figure 4.7.16 Y =AB C D+ABCD =AB D C_ +Ci =AB D
Page 214 Minimization Techniques Chapter 4
Digital Electronics by Ashish Murolia and RK Kanodia For More Details visit www.nodia.co.in
4-variable K-map
Y =ABC D+ABC D+ABCD+ABCD
=ABC D_ +Di+ABC D_ +Di
=ABC+ABC
=AB C_ +Ci =AB
Y =A BCD+ABCD+ABCD+ABCD
=ACD B_ +Bi+ACD B_ +Bi
=ACD+ACD
=CD A_ +Ai =CD
Y =ABC D+ABC D+ABCD+ABCD
=BC D A_ +Ai+BCD A_ +Ai
=BC D+BCD
=BD C_ +Ci
=BD
Y =ABC D+ABC D+ABCD+ABCD
=BC D A_ +Ai+BCD A_ +Ai =BC D+BCD =BD C_ +Ci =BD Y =A B C D+AB C D+A BCD+ABCD =B C D A_ +Ai+BCD A_ +Ai =B C D+BCD =B D C_ +Ci =B D
Chapter 4 Minimization Techniques Page 215
P O I N T S T O R E M E M B E R
(1) Looping a quad of 1’s eliminates the two variables that appear in both normal and complemented form.
(2) After grouping a quad, the resultant term contains only
n-2
^ h variables, where ‘n’ is the number of variables of K-map.
Grouping of Eight adjacent cells (Octet)
Eight cells are said to be adjacent, if they differ in three variables. It is possible to make a group of eight adjacent ones. Such a group is called an octet. In an octet, three variables associated with minterms will change and only one variable will remain same. The three variables that change will be eliminated and the variable which remain same will appear as result. Thus octet eliminates three variable. Some examples of octet in a 4-variable K-map are given as below.
Y =A B C D+ABC D+ABC D+AB C D+A BCD
+ABCD+ABCD+ABCD
A C D B B AC D B B ACD B B = _ + i+ _ + i+ _ + i +ACD B_ +Bi A C D AC D ACD ACD = + + + C D A A CD A A = _ + i+ _ + i C D CD = + D C C = _ + i =D Y =A B C D+ABC D+A B C D+ABC D+A BCD +ABCD+A BCD+ABCD A C D B B A C D B B ACD B B = _ + i+ _ + i+ _ + i +ACD B_ +Bi A C D A C D ACD ACD = + + + A C D D AC D D = _ + i+ _ + i A C AC = + A C C = _ + i A = Y =A B C D+ABC D+ABC D+AB C D+A BCD
+ABCD+ABCD+ABCD
A C D B B AC D B B ACD B B = _ + i+ _ + i+ _ + i +ACD B_ +Bi A C D AC D ACD ACD = + + + C D A A CD A A = _ + i+ _ + i C D CD = + D C C = _ + i =D
Chapter 4 Minimization Techniques Page 217
a group, that variable is eliminated from the resultant expression. Variables that are same in all with the group must appear in the final expression. Each group gives us a product term and summation of all product term gives us a Boolean expression.
From the above discussion we can outline generalized procedure to simplify Boolean expressions as follows:
M E T H O D O L O G Y
1. Construct the K-map as discussed. Enter 1 in those cells corresponding to the minterms for which function value is 1. Place 0’s in other cells.
2. Form the groups of possible 1s as pair, quad and octet. There can be overlapping of groups if they include common cells. While doing this make sure that there are minimum number of groups.
3. Encircle the cells which contain 1s and are not adjacent to any other cell. These are known as isolated minterms and they appear in the expression in same form.
4. Avoid any redundant group.
5. Write the Boolean term for each group and obtain the minimized expression by summing product terms of all the groups.
EXAMPLE 4.16
Minimize the expression using K-map.
, ,
F A B C_ i =ABC+A BC+ABC+AB C+A B C
SOLUTION :