badass tutorial karnaugh maps
DESCRIPTION
K map explanationTRANSCRIPT

5/28/2018 BADASS Tutorial Karnaugh Maps
1/16
Ms Sandhya Rani Dash
UNIT 4: COMBINATIONAL LOGIC MINIMISATION AND DESIGN USING
KARNAUGH MAP
Structure
4.1 Introduction
4.2 Objectives4.3 Karnaugh Map
4.3.1 2, 3, 4 variable Karnaugh map4.3.2 Definition of implicates
4.3.3 Prime implicates4.3.4 Essential and NonEssential prime implicates
4.3.5 Truth table representation on Karnaugh Map4.4 Logic Minimization using Karnaugh Map
4.5Five&Six Variable Maps4.6 Minimization of Logic Functions using minterm/maxterm4.7 Dont care Conditions
4.8 Unit Summary
4.1 Introduction
In the previous unit we have discussed about logic operations and Boolean algebra.
Boolean algebraic theorems are used for the manipulation of logical expressions. In
this unit we will discuss about the minimization of logical functions using karnaugh
maps. it is the simplest and most commonly used method for simplifying Boolean
expressions .The nvariable k map methods for simplification of Boolean or
switching functions are described here. The methods for minimization of
combinational logics are also explained in this unit
4.2 Objectives
After going through this unityou will be able to:
i) define a combinational circuit.
ii) explain the nvariable karnaugh maps.
iii) define different types of implicantes
iv)convert a standard SOP &POS expression into truth table format
iv) simplify the combinational logic functions using k map.
v) minimize the SOP & POS expressions

5/28/2018 BADASS Tutorial Karnaugh Maps
2/16
vi) use the dont care conditions in karnaugh map for further simplification.
COMBINATIONAL CIRCUITS
Combinational circuits consist of logic gates whose output depends only on thecurrent inputs at any given time. It does not store the history of the circuit. So memory
is not required for a combinational circuit.
A combinational circuit consists of input variables, logic gates and output variables.
The logic gates accept signals from the inputs and generate signal to the output. The
information transfer from input to output is in the binary form. A Block diagram of a
combinational circuit is shown below.
n input Variables m output variables
. .
. .
. .
The n input binary variables come from an external source: The m output variables
go to an external destination. In many applications, the source and the destination are
storage registers. For n input variables, there are 2npossible combinations of binary
input values. A combinational circuit can be described by m Boolean functions, one
for each output variable.
4.3 Karnaugh Map
The simplification of logical functions using Boolean laws and theorems become
complex with the increase in the number of variables and terms. So to avoid this type
of complexity, the KMap method was first proposed by Veitch and Gightly. It was
latter modified by Karnaugh and is now popularly known as the Veitch Diagram or
Karnaugh Map (or Kmap).
The Kmap technique provides a systematic method foe simplifying and manipulating
Boolean expression. It is a graph composed of an arrangement of an adjacent cells.
Each cell represent a particular combinations of variables insum or productform. The
Combinational
Logic circuit

5/28/2018 BADASS Tutorial Karnaugh Maps
3/16
KMap is actually a modified form of a truth table. Here the combinations are
conveniently arranged to aid the simplification process by applying the rule
AB + AB' = A. Although the Kmap technique may be used for any number of
variables, it is generally used up to six variables. Beyond which it would be very
difficult.
4.3.1 2, 3, 4 variable Karnaugh map
In an nvariable Kmap, there are 2n
cells where each cell corresponds to one
combination of nvariables. Therefore, for a 2variable Kmap, there are 22= 4
possible combinations of minterms. Similarly, for 3 and 4 variable Kmap, there
should be 23= 8 and 2
4= 16, number of minterms and so on. The 2, 3, 4 variable K
maps are shown in the figure given below.
The decimal codes corresponding to each combination of variables (minterm) written
in each cell at the right corner. The variables have been designated as A, B, C, D and
the binary numbers formed by them are taken as AB, ABC, and ABCD for 2, 3, 4
variables respectively.
The decimal codes given in 3 and 4 variable Kmaps are cyclic, or unit distance
codes. This code differs in one variable. This make easier for the simplification of
Boolean function by grouping of the adjacent cells. The left and right most cells of the

5/28/2018 BADASS Tutorial Karnaugh Maps
4/16
three variables Kmap are adjacent. For example: The cells 0 & 4 are adjacent and the
cells 1 & 5 are adjacent. In 4 variables Kmap the cells to the extreme left and right as
well as at the top and bottom portion are adjacent.
4.3.2 Truth table representation on Kmap
The truth table is a common way of representing the logical expressions of a circuit. It
consists of a list of the possible combinations of input variable values and the
corresponding output values (1 or 0). The standard SOP & POS expressions can be
determined from a truth table. Also the outputs of a truth table of a logic function can
be represented on the kmap. Let us consider a truth table of 3 variable logical
functions as follows.
Input OutputA B C Y
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
Corresponding to the output of logic 1, Y can be written in standard SOP form as_ _ _ _ _ _
Y= ABC + ABC + ABC + ABC
Corresponding to logic 0, y can be written in POS form as_ _ _ _ _ _
Y= (A + B + C) (A + B + C) (A + B + C) (A + B + C)
The value of the output variable Y (0 or 1) for each row of truth table is entered in the
corresponding cells of the Kmap The KMap for the above three variable expressionis shown below.
Variables
_ _
AB
_
AB AB
_
AB
00 01 11 10
_C 0 0 1 0 1
C 1 1 0 1 0

5/28/2018 BADASS Tutorial Karnaugh Maps
5/16
This is the common procedure used to represent a truth table on the Kmap. On the
other hand a truth table can also b e prepared, if a Kmap is given by following the
reverse process.
Conversion of SOP expression to truth table format
The steps for converting a SOP expression to truth table format are as follows.
Step1: List all possible combinations of binary values of the variables in the
expression.
Step2: Convert the SOP expression to standard form if it is not already.
Step3: Finally place a 1 in the output column for each binary value that makes the
standard SOP expression and place a 0 for all the remaining binary values.
Example: Develop a truth table for the standard Sop expression
_ _ _
ABC + ABC
SOLUTION:The truth table for the above standard Sop expression is given below
A B C OUTPUT PRODUCT
TERM
0 0 0 0
0 0 1 0
0 1 0 1
_ _
ABC
0 1 1 0
1 0 0 0
1 0 1 1_
ABC
1 1 0 0
1 1 1 0

5/28/2018 BADASS Tutorial Karnaugh Maps
6/16
Conversion of POS expression to truth table format
A POS expression is equal to 0 only if at least one of the sum term is equal to 0.
To construct a truth table from a POS expression, the steps are as follows.
Step1: List all possible combinations of binary values of the variables in the
expression just as was done for the SOP expression
Step2: Convert the SOP expression to standard form if it is not already.
Step3: Finally place a 0 in the output column for each binary value that makes the
standard SOP expression and place a 1 for all the remaining binary values.
Example: Develop a truth table for the standard POS expression
_ _ _ _ _
(A + B + C) (A + B + C) (A + B + C)
SOLUTION:The truth table for the above standard POS expression is given below
A B C OUTPUT PRODUCT
TERM
0 0 0 1
0 0 1 0__
A + B + C
0 1 0 0_
A + B + C
0 1 1 1
1 0 0 1
1 0 1 1
_ _ _
A + B + C
1 1 0 1
1 1 1 0

5/28/2018 BADASS Tutorial Karnaugh Maps
7/16
Self Check Exercise 1
1)Draw a 2, 3, 4 variable Kmap and label each cell according to its binary value.
2) Write the problem term for each cell in a 2, 3, 4 variable K map
3) Develop a truth table for each of the standard SOP expression
_ _ _i) ABC +ABC
_ _ _ii) ABC + ABC
4) Develop a truth table for each of the standard POS expression
_ _ _ _ _i) (A+B+C) (A+B+C) (A+B+C)
_ _ _ _ii) (A+B+C) (A+B+C) (A+B+C)
4.4 Logic Minimization Using Karnaugh Map
Simplification of logic functions with Kmap is based on the principle of combining
terms in adjacent cells. The adjacent (Horizontal & vertical but not diagonal) cells
differ in only one variable. So the minimization of logical functions are achieved by
grouping adjacent 1s or 0s in groups of 2i
, where i= 1, 2, 3, .,n is the number of
variables. The process of simplification involves grouping of minterms by drawing a
loop around the c ells and identifying prime implicants and essential prime implicants.
Prime Implicant
A prime implicant is a group of minterms that can not be combined with any other
minterms or groups.
Essential Prime Implicant
An essential prime implicant is a prime implicant in which one or more minterms are
unique. i.e. it contains at least one minterm which is not contain in any other prime
implicant.

5/28/2018 BADASS Tutorial Karnaugh Maps
8/16
4.5 Five & Six Variable Maps
A 5variable Kmap contains 25
=32 number of squares. The no. of square is always
equal to the no. of minterms. The 32 minterms are designated as m0 , m1, m2 . . . . . m31.
_ _ _ _ _The input variables are A B C D E ,E , . . . . . . ABCDE in SOP form. In POS form the
_ _ _ _ _ _input variables are marked as A +B +C + D + E, A + B + C +D +E, A +B +C +D +E
with max term designations M0, M1, M2. . . . . M31. Boolean functions with five
variables can be simplified using two 4variable maps (16 cells each)
For 6 variable Kmap, we need 26 = 64 no. of squares. Maps of more than four
variables are not as simple to use. Maps with seven or more variables need too many
squares. So these become more complicated to solve the logical functions. The five
and six variable Kmaps are shown in the figure.
CDE
AB 000 001 011 010 110 111 101 100
00
01
11
10
0 1 3 2 6 7 5 4
8 9 11 10 14 15 13 12
24 25 27 26 30 31 29 28
16 17 19 18 22 23 21 20
Fivevariable mapDEF
ABC 000 001 011 010 110 111 101 100
000
001
011
010
110
111
101
100
0 1 3 2 6 7 5 4
8 9 11 10 14 15 13 12
24 25 27 26 30 31 29 28
16 17 19 18 22 23 21 20
48 49 51 50 54 55 53 52
56 57 59 58 62 63 61 60
40 41 43 42 46 47 45 44
32 33 35 34 38 39 37 36
sixvariable map

5/28/2018 BADASS Tutorial Karnaugh Maps
9/16
The decimal code of the rows and columns are given in a reflected code sequence; the
minterm assigned to each square is read from these numbers. For example the square
in the second row (01) and fourth column (010), in the five variable map, is number
01010, the equivalent of decimal 10. Therefore, this square represents minterm m10.
The simplification of 5 & 6 variable Kmaps can be done in the same way as 4
variable Kmap
4.6 Minimization of Logic Functions Specified in Minterm/Maxterm
If an expression is simplified to a stage beyond which it cant be simplified, it will
require minimum number of gates with minimum number of inputs to the gates. Such
an expression is referred to as the minimized expression.
For minimizing a given logic expression specified in minterm/maxterm, we have to
prepare the kmap first. Then look for combination of 1s for the minterm(SOP form)
or 0s for the maxterm(POS form). We have to combine the 1s or 0s in such a way
that the resulting expression is minimum. Toachieve this, following rules can be used
which will lead to minimized expression.
Identifying the 1sthat cant be combined with any other 1s and form groupswith such single 1. These are essential prime implicants.
Identify the 1swhich are adjacent to only one other 1 and form groups anygroup of containing any two cells and which arent part of any group of four
or eight cells. A group of two cells is called a pair.
Group the 1s which results in groups of four cells but arent of an eightcells. A group of four cells is called a quad.
Group the 1s which results in groups of eight cells. A group of eight c ells iscalled a octet.
After identifying the essential groups of 2 , 4 and 8 1s , if there still remains1s which havent been encircled then these are to be combined
With each other or with other encircled 1s Discard any redundant group.

5/28/2018 BADASS Tutorial Karnaugh Maps
10/16
Form the logical sum of all the terms generated by each group.
When one or more than one variable appear in both complemented and un
complemented form with in a group , then that variable is eliminated from the term
corresponding to that group.
A larger group of 1s eliminates more variables. A group of two eliminates one
variable; a group of four eliminates two variables; similarly a group eight eliminatesthree variables.
The above rules are used to minimize the logical functions in the following example
given below.
Example: Simplify the expression Y= (7, 9, 10, 11, 12, 13, 14, 15) , using the k
map method.
SOLUTION:
The above function is in SOP form. The kmap for the function is as shown in the
figure.
In the given kmap there are three pairs and one quad. The output for each of theabove group is given as
_Y1= CD (AB + AB) = BCD
_ _ _ _Y2 = AB (CD + CD + CD + CD)
_ _ _Y3= AB (CD + CD ) + AB (CD + CD)
_= ABC + ABC
= AC
_ _ _Y4= AB (CD + CD) + AB (CD + CD)
_
= ABD + ABD

5/28/2018 BADASS Tutorial Karnaugh Maps
11/16
" #$
%&'(')*('+, " ,. ,/. ,0.,1
= AB+ AD + AC + BCD
It can be further simplified by using Boolean algebra.
Y = A (B + D + C) + BCD
Example 2: Simplify the expression Y = ( 0, 1 ,4, 5, 6, 8, 9, 12, 13, 14) using K
Map method
SOLUTION:
The given function is in the POS form. This can also be written as :
_ _Y = (A + B + C + D) (A + B + C + D) (A + B + C + D)
_ _ _ _ _= (A + B + C + D) (A + B + C + D) (A + B + C + D)
_ _ _ _ _ _ _ _= (A + B + C + D) (A + B + C + D) (A + B + C + D)
_ _ _= (A + B + C + D)
To simplify a POS expression for each maxterm in the given expression, a 0 has to be
entered in the corresponding cells and groups must be formed with 0 cells instead of
one cell to get the minimal expression. Here, a variable corresponding to 0 has to be
represented in the uncomplemented form and that corresponding to 1 in the
complemented form
The Kmap for the above function is shown in the figure given below:

5/28/2018 BADASS Tutorial Karnaugh Maps
12/16
!" $%& '()*& +,'./ )"& )0$&$ '"1 )"& 23'1 '4& .4)130&1 (5 0)(6"6"7 8 0&99:;

5/28/2018 BADASS Tutorial Karnaugh Maps
13/16
f ( A, B, C, D) = m (1, 3, 7, 11, 15) + d(0, 2, 5)
Solution: The above expression is in SOP form. The K map for this is given below.
Grouping of 1 gives
_ _ _ _ _ _Y1= AB (CD + CD + CD + CD)
_ _ _= AB(C + C)
_ _= AB
Grouping of 2 gives_ _ _ _
Y2= CD (AB + AB + AB + AB)
_=CD (A + A)
=CD
Therefore Y = Y1+ Y2
_ _= AB +CD

5/28/2018 BADASS Tutorial Karnaugh Maps
14/16
Example 2: Using the Kmap method, simplify the following Boolean expression.
f ( A, B, C, D) = M(4, 5, 6, 7, 8, 12) + d(1, 2, 3, 9, 11, 14)
SOLUTION:
The above expression is in POS form. The K map for this is given below.
Grouping of 1 gives_
Y1= A + B
Grouping of 2 gives_
Y2= A+C +D_ _
Y =( A + B) ( A + C + D)
Self check exercise 2
5. Use a Kmap to find the minimized SOP for each expression_
i) A + BC + CD_ _ _ _ _ _ _ _
ii) ABCD + ABCD + ABCD + ABCD_
iii) AC (B + C)_ _ _ _ _ _ _ _
iv) ABC + ABC + ABC + ABC6. Use a Kmap to find the minimized POS for each expression
_ _ _ _ _ _i) (A + B) (A + C) (A + B + C) (A + B + C)
_ _ _ _ _ _ _ _
ii) (A + B + C + D) (A + B + C + D) (A + B + C + D)

5/28/2018 BADASS Tutorial Karnaugh Maps
15/16
7. Reduce the expression m(1, 5, 6, 12, 13, 14) + d(2, 4)8. Using Kmap method, reduce the following expression to the simplest possible
POS & SOP forms. m (0, 2, 3, 6, 7) + d(8, 10, 11, 15)
4.8 Unit Summary
In this unit we have considered the simplification of logical expressions by using the
nvariable Kmap technique. The Kmap is a chart or graph composed of an
arrangement of adjacent cells, each representing a particular combination of variables
in a sum or product term. The nvariable Kmap has 2ncells or squares and its use is
limited to six variables.
The truth table representation of the Boolean expressions is also discussed here. The
truth table representation is a common way of representing the logical expression of a
circuit in a concise format. The standard SOP & POS expressions can be determined
from a truth table.
In Kmaps, dont care terms are also used to help in reducing the expression.
Combinations for which the value of an expression isnt specified, are called dont
care combinations. A dont care term is a minterm/maxterm in a logic function which
may or may not included.
Answers to Check Your Progress
1) A 3vaiable Kmap has
i) Eight cells ii) three cells iii) sixteen cells iv) four cells2)In a 4vaiable Kmap, a 2vaiable product term is produced by
i) a two cell group of 1sii) an eight cell group of 1siii)a four cell group of 1siv)a four cell group of 0s

5/28/2018 BADASS Tutorial Karnaugh Maps
16/16
3) On a Kmap, grouping the 0s produces
i) a product of sum expression
ii) a sum of product expression
iii) a dont care condition
iv) ANDOR logic
4) A 5variable Kmap has
i) sixteen cells ii) thirtytwo cells iii sixtyfour cells iv) eight cells
5) Dont care terms are represented by which alphabet of the following
i) Y & Z ii) X & d iii) T & C iv) N & C
6) The dont care term in kmap can have the value
i) 0 ii) 1 iii) both 0 or 1
Answers: 1 (i) 2 (iii) 3 (i) 4 (ii) 5 (ii) 6 (iii)
Unit End Exercise
1. Simplify the following expression using Kmap
_ _ _ _ _ _ _ _ _i) ABC + ABC + ABC + ABC
_ _ _
ii) ABC + AB + C + BC + DB2.Simplify the following expression using Kmap
_ _ _
i) A(A + B + C)(A + B + C)(A + B +C)(A + B + C) _ _
ii) (A + B) (A + B + C) (A + C)3. Draw a truth table for the equations given below:
_ _i) Y= AC + AB ii) y= A(B + C)