L3,4,5-K-maps
-
Upload
domainname9 -
Category
Documents
-
view
215 -
download
0
Transcript of L3,4,5-K-maps
-
8/6/2019 L3,4,5-K-maps
1/24
Karnaughmap (k-map) It is a simplification tool for managing Boolean algebraic
expressions.
Complex boolean function can be simplified by using
boolean algebra but it lacks specific rules and becomes
tedious sometimes. The map method provides a simple and
straightforward mehtod.
The Karnaugh Map will simplify logic faster and more easily
in most cases.
-
8/6/2019 L3,4,5-K-maps
2/24
Karnaugh map K-map method is a graphical technique for simplifying
Boolean function.
k-map is pictorial arrangement of truth table.Each combinationof variables in a truth table is called as Minterm.
A function of n variables will have 2 minterms. A Booleanfunction is equal to 1 for some minterms and to 0 for others.
The map is a diagram made of squares with each squarerepresenting a minterm.The rows and columns are ordered
according to the principles ofGray code.
Boolean simplification is actually faster than the Karnaughmap for a task involving two or fewer Boolean variables. It isstill quite usable at three variables, but a bit slower. At four
input variables, Boolean algebra becomes tedious.
-
8/6/2019 L3,4,5-K-maps
3/24
Karnaugh map
2 variable map 3 variable map 4 variable map
Note the sequence of numbers across the top of the map. It
is not in binary sequence which would be 00, 01, 10, 11. It
is 00, 01, 11, 10 which is Gray code sequence.
-
8/6/2019 L3,4,5-K-maps
4/24
What is Gray code sequence?
Gray code sequence only changes one bit as we go from one
number to the next in the sequence, unlike binary.
Adjacent cells vary by only one bit because a Gray code
sequence varies by only one bit.
-
8/6/2019 L3,4,5-K-maps
5/24
Karnaugh Maps - Rules of Simplification
The K-Map uses the following rules for simplification of
expressions by grouping together adjascent cells
containing ones.
1. Groups may not include any cell containing a zero
-
8/6/2019 L3,4,5-K-maps
6/24
2. Groups may be horizontal or vertical, but not diagonal.
3. Groups must contain 1, 2, 4, 8, or in general 2n cells.
That is if n = 1, a group will contain two 1's since 21 = 2.
If n = 2, a group will contain four 1's since 22 = 4.
-
8/6/2019 L3,4,5-K-maps
7/24
-
8/6/2019 L3,4,5-K-maps
8/24
4. Each group should be as large as possible.
5. Each cell containing a one must be in at least one group.
-
8/6/2019 L3,4,5-K-maps
9/24
6. Groups may overlap.
7. Groups may wrap around the table. 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.
-
8/6/2019 L3,4,5-K-maps
10/24
8. There should be as few groups as possible, as long as this
does not contradict any of the previous rules.
Summmary:
1. No zeros allowed.
2. No diagonals.
3. Only power of 2 number of cells in each group.
4. Groups should be as large as possible.
5. Every one must be in at least one group.
6. Overlapping allowed.
7. Wrap around allowed.
8. Fewest number of groups possible
-
8/6/2019 L3,4,5-K-maps
11/24
3 variable map
Mapping the four product terms (p-
terms) yields a single group of four,
which is A.
-
8/6/2019 L3,4,5-K-maps
12/24
-
8/6/2019 L3,4,5-K-maps
13/24
Mapping the four p-terms above yields a group of four. Visualizethe group of four by rolling up the ends of the map to form a
cylinder, then the cells are adjacent.We normally mark the group of
four as above left. Out of the variables A, B, C, there is a common
variable: C'. C' is a 0 over all four cells. Final result is C'
-
8/6/2019 L3,4,5-K-maps
14/24
Larger 4-variable Karnaugh maps
The above Boolean expression has
seven product terms. The dashed
horizontal group corresponds the
the simplified product term AB. Thevertical group corresponds to
Boolean CD. Since there are two
groups, there will be two product
terms in the Sum-Of-Products result
ofOut=AB+CD.
-
8/6/2019 L3,4,5-K-maps
15/24
The four cells above are a group of four because B=0 for the four
cells, and D=0 for the four cells. Thus, these variables (A, B) are not
involved with this group of four. This single group comes out of themap as one product term for the simplified result: Out=B'D'.
-
8/6/2019 L3,4,5-K-maps
16/24
The above group of eight has one Boolean variable in common: B=0.
Therefore, the one group of eight is covered by one p-term: B'. The
original eight term Boolean expression simplifies to Out=B'
-
8/6/2019 L3,4,5-K-maps
17/24
Boolean function obtained from a k-map may not be unique.
Often times there is more than one minimum cost solution to a
simplification problem. Such is the case illustrated below.
-
8/6/2019 L3,4,5-K-maps
18/24
Both results above have four product terms of three Boolean
variable each. Both are equally valid minimal costsolutions. The
difference in the final solution is due to how the cells are grouped
as shown above. A minimal cost solution is a valid logic design
with the minimum number of gates with the minimum number of
inputs.
-
8/6/2019 L3,4,5-K-maps
19/24
EXMP:
Out=ABCD+ABCD+ABCD
+ABCD+ABCD+ABCD++ABCD+ABCD+ABCD
Ans.=AC+AD+BC+BD
EXMP:////////////////
Out=ABCD+ABCD+ABCD
+ABCD+ABCD+ABCD++ABCD+ABCD+ABCD
Ans.=CD+CD+ABC
Ans.=CD+CD+ABD
EXMP:////////////
Out=ABCD+ABCD+ABCD
+ABCD+ABCD+ABCD+
+ABCD+ABCD+ABCD
Ans.=C +ABD
-
8/6/2019 L3,4,5-K-maps
20/24
EXMP:
F(A,B,C,D)= (1,5,7,9,11,13,15)Ans.=CD+AD+BD = D(A+C+B)
F(A,B,C,D)= (1,3,7,8,10,12,13,15)
Ans.=ABD+BCD+ABC+ABD
F(A,B,C,D)= (1,2,9,10,11,14,15)////////////////
Ans.=BCD+AC+BCD F(A,B,C,D)= (1,5,6,7,11,12,13,15)////////////////
Ans.=ABC+ABC+ACD+ACD
F(A,B,C,D)= (0,1,2,5, 13,15)
Ans.=ABD+ABC+BCD+ABC F(A,B,C,D)= (4,5, 7,11,15)
Ans.=ABC+BCD+ACD
Ans.=ABC+ABD+ACD
-
8/6/2019 L3,4,5-K-maps
21/24
Product-of-sum simplification:
Generally Boolean expressions derived from the maps are
expressed in sum-of-product form. The product terms are ANDterms and sum denotes the ORing of these terms.
But we can obtain product-of-sum form from the map. If we
mark the empty squares with 0s and combine them into groups
of adjacent squares, we obtain the complement of the function,
F. Taking the complement of F we will get expression for F in
product-of-sum form.
F(A,B,C,D)= (0,1,2,5, 8,9,10)
Combining the squares with 1s gives sum-of-product form.F=BD+BC+ACD
A sum-of-products expression can be implemented with NAND
gates.
-
8/6/2019 L3,4,5-K-maps
22/24
If squares marked with 0s are combined, we obtain :
F=AB+CD+BD
(F)=( AB+CD+BD)F=(A+B)(C+D)(B+D)
A product-of- sum expression can be implemented with NOR
gates.
-
8/6/2019 L3,4,5-K-maps
23/24
Dont care conditions:
The 1s and 0s in the map represent the minterms and make the
function equals to 1 or 0.
There are occasions when it does not matter if the function
produces 0 or 1 for a given minterm, we say that we dont care
what the function o/p is to be for this minterm.
Minterms that may produce either 0 or 1 for the function are said
to be dont-care conditions and are marked with X in the map.These dont -care conditions can be used to provide further
simplification of the algebraic expression.
-
8/6/2019 L3,4,5-K-maps
24/24
Another expamle, consider the Boolean function together with
the dont-care minterms:
F(A,B,C)= (0,2,6)
d(A,B,C)= (1,3,5)
By including dont-care minterms the simplified expression is :
F=A+BC (requires 1 AND and 1 OR gate)
If dont-care minterms are not included the simplified expression
would be:
F=AC+BC (requires 2 AND and 1 OR gate)