K Map
K Map
requires the use of logic gates. A smaller number of gates, with each gate (other then Inverter) having less number of inputs, may reduce the cost of the implementation. There are 2 methods for simplification of Boolean functions.
1
straightforward. A K-map for a function of n variables consists of 2n cells, and, in every row and column, two adjacent cells
Examples of K-Maps:
Examples:
Cell numbers are written in the cells. 2-variable K-map
B A
1 1 3
0 0 1 2
3-Variable K-Map:
3-variable K-map
BC
00 01 11 10
0 0 1 4
1 5
3 7
2 6
4-variable K-map
4-variable K-map
AB CD 00 01 11 10
00 0 01 4 11 12 10 8
1 5 13 9
3 7 15 11
2 6 14 10
in which each variable appears exactly once, in either its true or its complemented form, but not in both, and,which is equal to 1 for exactly one combination of values of the n variables.
in which each variable appears exactly once, in either its true or its complemented form, but not in both which has a value of O for exactly one combination of values of the n variables.
Maxterms (continued):
For every K-map, each cell has one Maxterm
associated with it. Thus for cell no.13 in the 4-variable K-map, M13 = A + B + C + D By De Morgans theorem, mi = Mi ADJACENT minterms (Maxterms): Minterm which are identical, except for one variable, are considered to be adjacent to one another. In a K-map, the corresponding cells are said to be adjacent cells.
8
Adjacent minterms:
Thus in K-4,
Cell O is adjacent to cells 1, 4, 2 and 8. In a K-map, the corresponding cells in the top and the bottom rows are adjacent to each other. Similarly the corresponding cells in the leftmost column and the rightmost column are adjacent to each other. An Example: A function F, of 4 variables, is defined by the truth table given in the next slide. ( and again given in the next 3 slides):
9
10
Example: TruthTable
Dec number
A B C D
0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1
F
1 0 1 1 0 1
11
0 1 2 3 4 5
A 0
B 1
C D 1 0 1
7
8 9
0
1 1
1
0 0
1 1
0 0 0 1
1
1 0
10
11
1
1
0
0
1 0
1 1
1
1
12
A 1 1 1
B C D 1 0 0 1 0 1 1 1 0
F 0 0 1
12 13 14
15
1 1 1
1
13
The above table can be described by F = m(0, 2, 3, 5, 6, 7, 8, 10, 11, 14, 15)
The function can be written as: F = ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD (1) Each term on the RHS is a minterm. The above function can be simplified by using the Identities.
14
AB
CD
00 01 11 10
00 1 01 0 11 0 10 1
0 1 0 0
1 1 1 1
1 1 1 1
15
Each group contains only 1s. The group is not completely a part of a larger group.
Choose the minimum number of the largest sized groups needed to cover all the 1s. Each group is represented by an expression which is an intersection of the minterm in the group. The simplified solution is a logical OR of the expressions of all the groups chosen in steps 3 above.
16
The simplification process is a dual of the process for the SOP form.
17
Some definitions: The definitions: Given a function F of n variables. Implicant: A product term P is an implicant of F if and only if, for the combination of values of the n variables, for which p = 1, F is also equal to 1. Every minterm is an implicant. Prime Implicant : An implicant is a Prime implicant if after deleting any literal from it , the remaining product term is no longer an implicant. Or an implicant whose group in the K-map is not completely covered by another implicant, represented by a larger group. Essential Prime Implicant : A Prime implicant that contains a product of literal(s), that is not in any other Prime implicant.
18
19
F = C + B.D + A.B.D
21
Exam 2: F= m(0,2,8,9,10,11,14,15)
F= A.B+A.C+B.D
22
Carry= A.C+A.B+B.C
S=A.B.C + A.B.C+A.B.C+A.B.C
23
N1 and N2 ; Two logic circuits. W, X, Y, Z: independent logic variables For each of the 16 possible combination of values for W, X, Y and Z, some specific value of A, B and C would be the outputs. Three variables normally have 8 possible sets of values .However, in the above circuit N1 may constrain the values to a smaller set. The remaining set of values for A, B and C would not affect the output of N2.Thus for N2, the non available inputs are called dont care inputs, since these inputs do not have any effect on F.
24
N1
B C
N2
Let A,B and C never have 001 or 110 values. Then for F, values of 001 and 110 for A, B and C are not of any importance.
Exam 2: All possible input combinations are present. But the output is used in such a way that we do not care whether it is 0 or 1 for certain input combinations. F= m(0,3,7)+ d(1,6) Or F = M(2,4,5) D(1,6)
25
26
27
F2=C
F3=C F1=BC+BC
28
29
N1
N2
30