Post on 19-Mar-2017
The Karnaugh The Karnaugh MapMap
Contents
• Introduction• The Map Methods•Rules for Grouping•Solution of Sop and POS expression with K-map •Don’t Care Conditions
dEPARTMENT OF cOMPUTER SCIENCE
KARNAUGH MAP• INTRODUCED BY MAURICE KARNAUGH IN 1953• ALSO KNOWN AS THE K-MAP• IT IS A METHOD TO SIMPLIFY BOOLEAN ALGEBRA
EXPRESSIONS.• IT REDUCES THE NEED FOR EXTENSIVE CALCULATIONS.• MODIFIED FORM OF TRUTH TABLE.• USE A 2-DIMENSIONAL GRID• USED TO PRODUCE THE SIMPLEST SOP OR POS EXPRESSION
POSSIBLE, KNOWN AS THE MINIMUM EXPRESSION.• DIFFICULT FOR MORE THAN 5 VARIABLES• LESS TIME AND SPACE CONSUMING
THE KARNAUGH MAPTHE KARNAUGH MAP
• NUMBER OF SQUARES = NUMBER OF COMBINATIONS
• EACH SQUARE REPRESENTS A MINTERM
• N VARIABLES 2^N SQUARES
• 2 VARIABLES 2^2=4 SQUARES
• 3 VARIABLES 2^3=8 SQUARES
• 4 VARIABLES 2^4=16 SQUARES
STEPS TO SOLVE A BOOLEAN EXPRESSION USING K-MAP
Following are the steps to solve a boolean expression using K-MAP.Step 1: InitiateStep 2: Mapping A Standard Expression.Step 3: Form GroupsStep 4: Determining The Minimum Expression
Express the given expression in its SOP or POS form.
Consider the adjacent 'ones' (or ‘zeroes’) in the K-map cells and group them.
Enter the value of 'one' for each product-term into the K-map cell, while filling others with zeros.
The 2 Variable K-Map• THERE ARE 4 CELLS AS SHOWN:
AB 0
0
1
1 ABAB’
A’BA’B’m1m0
m2 m2
The 3 Variable K-Map
• THERE ARE 8 CELLS AS SHOWN:
CCABAB 00 11
0000
0101
1111
1010
CBA CBA
CBA BCA
CAB ABC
CBA CBA
m2
m1
m6
m3
m4
m7
m5
m0
The 4-Variable K-Map
CDCDABAB 0000 0101 1111 1010
0000
0101
1111
1010 DCBA
DCAB
DCBA
DCBA
DCBA
DCAB
DCBA
DCBA
CDBA
ABCD
BCDA
CDBA
DCBA
DABC
DBCA
DCBAm0
m4
m2
m7m5
m12
m6
m13 m15 m14
m3m1
m10m11m9m8
TYPES OF MINIMIZATIONS
1.SOP MinimizationOR
Sum of products Minimization
2. POS MinimizationOR
Product od sums Minimization
1. K-Map SOP Minimization
• A BOOLEAN EXPRESSION MUST BE IN STANDARD FORM BEFORE YOU USE A K-MAP. THERE ARE TWO METHODS FOR THIS PURPOSE:
• 1.ALGEBRIC MANIPULATION
• 2. NUMERICAL EXPANSION
STEP:1Initiate
Step 1: Write the binary value of the two variables and attach a 0 for the missing variable.
Step 2: Write the binary value of the two variables and attach a 1 for the missing variable.
The two resulting binary numbers are the values of the standard SOP terms.
If the function is not in standard fom then we first convert into standard form as given
below:• F = A‘C + A‘B + AB‘C +BC
• 001+011+010+011+101+011+111 (NUMERICAL EXPANSION)
• =A‘C(B+B‘)+A’B(C+C’)+AB’C+BC(A+A’) (SIMPLIFICATION USING RULES)
• =A’BC+A’B’C+A’BC+A’BC’+AB’C+ABC+A’BC
• =A’BC+A’B’C+A’BC’+AB’C+ABC
• 011 001 010 101 111
• =M1+M2+M3+M5+M7
Mapping a Standard SOP Expression
For an SOP expression in standard form:A 1 is placed on the
K-map for each product term in the expression.
Each 1 is placed in a cell corresponding to the value of a product term.
CBA
CCABAB 00 11
0000
0101
1111
1010
CBA CBA
CBA BCA
CAB ABC
CBA CBA1
STEP:2
CCABAB 00 11
0000
0101
1111
1010
Mapping a Standard SOP Expression (full example)
The expression: CBACABCBACBA
000 001 110 100
1 1
1
1
• F = A‘C + A‘B + AB‘C +BC
• 001+011+010+011+101+011+111 (NUMERICAL EXPANSION)
• =A‘C(B+B‘)+A’B(C+C’)+AB’C+BC(A+A’) (SIMPLIFICATION USING RULES)
• =A’BC+A’B’C+A’BC+A’BC’+AB’C+ABC+A’BC
• =A’BC+A’B’C+A’BC’+AB’C+ABC
• 011 001 010 101 111
• =M1+M2+M3+M5+M7
CCAABB
00 11
0000010111111010
Mapping a Non-Standard SOP Expression
1
1
1
1
1
GROUPS AND THEIR OUT PUT IN VARIABLE
16
For a 3-variable map:1. A 1-cell group yields a 3-
variable product term2. A 2-cell group yields a 2-
variable product term3. A 4-cell group yields a 1-
variable product term4. An 8-cell group yields a
value of 1 for the expression.
• For a 4-variable map:1. A 1-cell group yields a 4-variable
product term2. A 2-cell group yields a 3-variable
product term3. A 4-cell group yields a 2-variable
product term4. An 8-cell group yields a a 1-
variable product term5. A 16-cell group yields a value of 1
for the expression.
• For a 2-variable map:1. A 1-cell group yields a 2-variable
product term2. A 2-cell group yields a 1-variable
product term3. A 4-cell group yields a value of 1
for the expression.
Cell Adjacency
CDCDABAB
0000 0101 1111 1010
0000010111111010
Adjacency in k map is defined one variable change
Grouping The Karnaugh map uses the following rules for the
simplification of expressions by grouping together adjacent cells containing ones.
1.Groups may not include any cell containing a zero.
2.Groups may be horizontal or vertical, but not diagonal.
STEP:3
RULES
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.
4. Each group should be as large as possible.
5.Each cell containing a one must be in at least one group.
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. There should be as few groups as possible, as long as this does not contradict any of the previous rules.
Prime Implicants
• A PRIME IMPLICANT IS A PRODUCT TERM OBTAINED BY COMBINING THE MAXIMUM POSSIBLE NUMBER OF
• ADJACENT SQUARES IN THE MAP.• IF A MINTERM IN A SQUARE IS COVERED BY ONLY
ONE PRIME IMPLICANT, THAT PRIME IMPLICANT IS SAID TO BE ESSENTIAL.
• THE PRIME IMPLICANTS OF A FUNCTION CAN BE OBTAINED FROM THE MAP BY COMBINING ALL POSSIBLE MAXIMUM NUMBERS OF SQUARES
Grouping the 1s (example)
CCABAB 00 11
0000 11
0101 11
1111 11 11
1010
CCABAB 00 11
0000 11 11
0101 11
1111 11
1010 11 11
Grouping the 1s (example)CDCD
ABAB 0000 0101 1111 1010
0000 11 11
0101 11 11 11 11
1111
1010 11 11
CDCDABAB 0000 0101 1111 1010
0000 11 11
0101 11 11 11
1111 11 11 11
1010 11 11 11
Determining the Minimum SOP Expression from the Map• THE FOLLOWING RULES ARE APPLIED TO FIND THE
MINIMUM PRODUCT TERMS AND THE MINIMUM SOP EXPRESSION:
1. AFTER GROUPING EACH GROUP VARIABLES THAT OCCUR BOTH COMPLEMENTED AND UNCOMPLEMENTED WITHIN THE GROUP ARE ELIMINATED CALLED CONTRADICTORY VARIABLES.
STEP:4
Determining the Minimum SOP Expression from the Map (example)
CDCDABAB 0000 0101 1111 1010
0000 11 110101 11 11 11 111111 11 11 11 111010 11
BCA
DCA
DCACAB
Determining the Minimum SOP Expression from the Map (exercises)
ACCAB
CCABAB 00 11
0000 11 11
0101 11
1111 11
1010 11 11
CDCDABAB 0000 0101 1111 1010
0000 11 11
0101 11 11 11
1111 11 11 11
1010 11 11 11
CBCBAD
Y=Σ(0,1,3)
=A’(B+B’)=A’.1=A’
=(A+A’)B=1.B=B
=(A+A’)(B’C’+BC’)=1.C’(B+B’)=C’.1=C’
=A(B’C’+B’C+BC+BC’)=A(B’(C+C’)+B(C+C’))=A(B+B’)=A
Y=Σ(0,2,4,5,6,7)
=(A’B’+AB’)(C’D’+CD’)=B’(A+A’)D’(C+C’)=B’D’
=(A’B+AB)+(C’D+CD)=B(A+A’)+D(C+C’)=BD
2. K-Map POS Minimization
• The approaches are much the same (as SOP) except that with POS expression, 0’s representing the standard sum terms are placed on the K-map instead of 1s.
CCABAB 00 11
0000
0101
1111
1010
Mapping a Standard POS Expression The expression:
))()()(( CBACBACBACBA
000 010 110
000
0
F= π(0,2,5,6)
Simplify the following Boolean function into (a) sum-of-products form and(b) product-of-sums form:F (A, B, C, D) = (0, 1, 2, 5, 8, 9, 10)Combining the squares with 1’s gives the simplified function in sum-of-products form:
(a) F = B’D’ + B’C’ + A’C’If the squares marked with 0’s are combined, as shown in the diagram, we obtainthe simplified complemented function:
F’ = AB + CD + BD’Applying DeMorgan’s theorem
(b) F = (A’ + B’) (C’ + D’) (B’ + D)
K-map Simplification of POS Expression
))()()()(( CBACBACBACBACBA
CCABAB 00 11
0000
0101
1111
1010 BA
0 0
0 00 AC1
11
ACBAF
F=π(0,1,2,3,6)
SOP Form
POS Form
F’=A’+BC’
F=A(B’+C)
Don’t Care Conditions
• A DON’T CARE CONDITION, MARKED BY (X) IN THE TRUTH TABLE, INDICATES A CONDITION WHERE THE DESIGN DOESN’T CARE IF THE OUTPUT IS A (0) OR A (1).
• A DON’T CARE CONDITION CAN BE TREATED AS A (0) OR A (1) IN A K-MAP.
• TREATING A DON’T CARE AS A (0) MEANS THAT YOU DO NOT NEED TO GROUP IT.
• TREATING A DON’T CARE AS A (1) ALLOWS YOU TO MAKE A GROUPING LARGER, RESULTING IN A SIMPLER TERM IN THE SOP EQUATION.
SIMPLIFY THE BOOLEAN FUNCTIONF (W, X, Y, Z) = (1, 3, 7, 11, 15)
WHICH HAS THE DON’T-CARE CONDITIONSD (W, X, Y, Z) = (0, 2, 5)