Lecture 5a
Karnaugh Map
Logic Simplification Methods
By using
Quine
McCluskey
method
Why we need to simplify Logic Boolean Expressions
● The complexity of the digital logic gates that implement a Boolean function is
directly related
○ to the complexity of the algebraic expression
● The simplest algebraic boolean expression is an algebraic expression
○ with a minimum number of terms and
○ with the smallest possible number of literals in each term.
● This expression produces a circuit with a minimum number of gates and the
minimum number of inputs to each gate.
The Map Method
● Boolean expressions may be simplified by algebraic means as discussed
earlier.
○ However, this procedure of minimization is awkward because it lacks specific rules to predict
each succeeding step in the manipulative process.
● The map method presented here provides a simple, straightforward
procedure for minimizing Boolean functions. This method may be regarded as
a pictorial form of a truth table. The map method is also known as the
Karnaugh map or K-map.
The Map Method - Contd
● Truth Table is organized in columns and rows
● The Karnaugh map is an array of cells in which each cell represents a binary
value of the input variables.
● The cells are arranged in a way so that simplification of a given expression is
simply a matter of properly grouping the cells. Karnaugh maps can be used
for expressions with two, three, four, and five variables.
No. of cells in a K map = No. of rows in a truth table = the total number of
combinations due to the input variables.
● Eg:
○ For three variables, the number of cells is 23 = 8.
○ For four variables, the number of cells is 24 = 16
K-maps
Process Steps for K-Map
● Identifying the expression
● K-mapping - Mapping the Truth Table on the Map
● Grouping
● Deriving the simplified expression
Identifying the expression
● Identifying the expression
○ Truth table
○ Circuit Diagram
○ Algebraic Expression - SOP form or POS form
■ K map is only used for the standard expression. If the expression is not in the standard
form then first it is converted into the standard form.
■ Each cell represent:
● For SOP: each cell represents the minterms
● For POS: each cell represents the maxterm
■ The output is
● For SOP: the sum of those cells that contains 1
● For POS: the sum of those cells that contains 0
Sum of Product Minimization using K-Map
Mapping the Truth Table on the Map - Two-Variable K-Map
Binary Sequence and Gray Code Sequence
● In K-map cells are arranged so that there is only a single bit change between
adjacent cell
● For that instead of Binary Sequence we use Gray codes
Mapping the Truth Table on the Map - Three-Variable K-Map
Four-Variable K-Map
Adjacent Cell
● Adjacent cells on a Karnaugh map
are those that differ by only one
variable.
● Cells that differ by only one
variable are adjacent.Cells with
values that differ by more than
one variable are not adjacent.
● Arrows point between adjacent
cells
● This is an essential aspect of the
construction of the K map. This
property allows
Filling up K-map cells - From Truth Table
Filling up K-map cells - From SOP Standard Expression
Y = A’B’C + ABC’ + A’BC’ + AB’C
How to create groups in K-map
Groups must have
● Groups may contain all 1s for SOP and all 0s for POS not both values
● A group may be horizontal or vertical - Rectangles/squares i.e no diagonals
● Size should be in power of two ie 1, 2, 4, 8….. That means that a group can contain
1, 2, 4, 8 …..cells
● No entries should be uncovered or no redundant groups
● Always create groups having the largest number of cells. The bigger the group the
simpler the expression will be.
Groups can
● Overlap
● Wrap around the table
Creating Groups
Example 2
Example 2 - Contd
Other Examples
Example 1
Example 2
Example 3
“Don’t Care” Conditions
● Sometimes a situation arises in which some input variable combinations are
not allowed.
○ For example, recall that in the BCD code there are six invalid combinations: 1010, 1011,
1100, 1101, 1110, and 1111. This will never occur in an application involving the BCD code,
they can be treated as “don’t care” terms with respect to their effect on the output.
○ That is, for these “don’t care” terms either a 1 or a 0 may be assigned to the output; it really
does not matter since they will never occur.
Advantage of using “Don’t Care” terms
● The “don’t care” terms can be used to advantage on the Karnaugh map. An X
is placed in the cell. When grouping the 1s, the Xs can be treated as 1s to
make a larger grouping or as 0s if they cannot be used to advantage.
● The larger a group, the simpler the resulting term will be.
Example 1
A logic function that has a 1 output
only when the BCD code for 7, 8, or
9 is present on the inputs.
Example 2
Example 3
Product of Sum Minimization using K-Map
Filling up K-map cells - From POS Standard Expression
Example
Converting Between POS and SOP Using the K - Map
For a POS expression, all the cells that do not contain 0s contain 1s, from which
the SOP expression is derived.
Likewise, for an SOP expression, all the cells that do not contain 1s contain 0s,
from which the POS expression is derived.
Example