0% found this document useful (0 votes)
8 views52 pages

Lecture#4

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views52 pages

Lecture#4

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 52

Digital Logic & Design

Lecture 4
Page 219 to 236, 11th Edition
The Karnaugh Map

A Karnaugh map provides a systematic method for


simplifying Boolean expressions and, if properly
used, will produce the simplest SOP or POS
expression possible, known as the minimum
expression.
Cont…

A Karnaugh map is similar to a truth table because it


presents all of the possible values of input variables
and the resulting output for each value. Instead of
being organized into columns and rows like a truth
table, 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.
K-Map 2 Variable
K-Map 2 Variable

Mapping into K-
Map
K-Map 2 Variable : Example

Form Rules to formed a Group:


X  AB  ? • Groups can be formed around
AB
“0 or 1” within a cell
• Group contained with “power of
2” i,e, 20=1, 21=2, 22=4, 23=8…
• For group cell must be
adjacent to each other (row,
column, square or
rectangular)
Mapping into K- • Should be as large as possible,
Map
but few in numbers (as
possible)
• Each value must be or atleast
Exercise?
• K-Map 2
Variable :
X  AB  AB  AB
Exercise?
• K-Map 2
Variable :
X  AB  AB  AB
The 3-Variable Karnaugh Map

The 3-variable Karnaugh map is an array of eight cells, as


shown in Figure 4–25(a). In this case, A, B, and C are used for
the variables although other letters could be used.
Binary values of A and B are along the left side (notice the
sequence) and the values of C are across the top. The value of
a given cell is the binary values of A and B at the left in the
same row combined with the value of C at the top in the same
column.
For example, the cell in the upper left corner has a binary value
of 000 and the cell in the lower right corner has a binary value
of 101. Figure 4–25(b) shows the standard product terms that
are represented by each cell in the Karnaugh map.
Figure 4–25
The 4-Variable Karnaugh Map

The 4-variable Karnaugh map is an array of sixteen cells,


as shown in Figure 4–26(a).
Binary values of A and B are along the left side and the
values of C and D are across the top. The value of a given
cell is the binary values of A and B at the left in the same
row combined with the binary values of C and D at the top
in the same column.
For example, the cell in the upper right corner has a binary
value of 0010 and the cell in the lower right corner has a
binary value of 1010. Figure 4–26(b) shows the standard
product terms that are represented by each cell in the 4-
variable Karnaugh map.
Figure 4–26
Karnaugh Map SOP Minimization

As stated in the last section, the Karnaugh map is


used for simplifying Boolean expressions to their
minimum form.
A minimized SOP expression contains the fewest
possible terms with the fewest possible variables per
term. Generally, a minimum SOP expression can be
implemented with fewer logic gates than a standard
expression.
Mapping a Standard SOP Expression

For an SOP expression in standard form, a 1 is


placed on the Karnaugh map for each product term
in the expression. Each 1 is placed in a cell
corresponding to the value of a product term.
For example, for the product term AB’C, a 1 goes in
the 101 cell on a 3-variable map.
Cont…

When an SOP expression is completely mapped,


there will be a number of 1s on the Karnaugh map
equal to the number of product terms in the standard
SOP expression.
The cells that do not have a 1 are the cells for which
the expression is 0. Usually, when working with SOP
expressions, the 0s are left off the map.
Steps

The following steps and illustration in Figure 4–28


show the mapping process.
Step 1: Determine the binary value of each product
term in the standard SOP expression. After some
practice, you can usually do the evaluation of terms
mentally.
Step 2: As each product term is evaluated, place a 1
on the Karnaugh map in the cell having the same
value as the product term.
Figure 4–28
Mapping a Nonstandard SOP Expression

A Boolean expression must first be in standard form


before you use a Karnaugh map. If an expression is
not in standard form, then it must be converted to
standard form.
Karnaugh Map Simplification of SOP Expressions

The process that results in an expression containing


the fewest possible terms with the fewest possible
variables is called minimization. After an SOP
expression has been mapped, a minimum SOP
expression is obtained by grouping the 1s and
determining the minimum SOP expression from the
map.
Grouping the 1s

You can group 1s on the Karnaugh map according to


the following rules by enclosing those adjacent cells
containing 1s. The goal is to maximize the size of the
groups and to minimize the number of groups.
Cont…

1. A group must contain either 1, 2, 4, 8, or 16 cells, which


are all powers of two. In the case of a 3-variable map, 2^3
= 8 cells is the maximum group.
2. Each cell in a group must be adjacent to one or more
cells in that same group, but all cells in the group do not
have to be adjacent to each other.
3. Always include the largest possible number of 1s in a
group in accordance with rule 1.
4. Each 1 on the map must be included in at least one
group. The 1s already in a group can be included in
another group as long as the overlapping groups include
noncommon 1s.
Example
Cont…
Mapping Directly from a Truth Table
“Don’t Care” Conditions

Sometimes a situation arises in which some input


variable combinations are not allowed. There are six
invalid combinations: 1010, 1011, 1100, 1101, 1110,
and 1111. Since these unallowed states 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.
Cont…

The “don’t care” terms can be used to advantage on


the Karnaugh map. Figure 4–40 shows that for each
“don’t care” term, 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.
Karnaugh Map POS Minimization

In the last section, you studied the minimization of


an SOP expression using a Karnaugh map. In this
section, we focus on POS expressions.
The approaches are much the same except that with
POS expressions, 0s representing the standard sum
terms are placed on the Karnaugh map instead of 1s.
Mapping a Standard POS Expression

For a POS expression in standard form, a 0 is placed


on the Karnaugh map for each sum term in the
expression. Each 0 is placed in a cell corresponding
to the value of a sum term.
For example, for the sum term A + B’ + C, a 0 goes in
the 010 cell on a 3-variable map.
Steps

The following steps and illustration in Figure 4–43


show the mapping process.
Step 1: Determine the binary value of each sum
term in the standard POS expression. This is the
binary value that makes the term equal to 0.
Step 2: As each sum term is evaluated, place a 0 on
the Karnaugh map in the corresponding cell.
Karnaugh Map Simplification of POS Expressions

The process for minimizing a POS expression is


basically the same as for an SOP expression except
that you group 0s to produce minimum sum terms
instead of grouping 1s to produce minimum product
terms. The rules for grouping the 0s are the same as
those for grouping the 1s.
Cont…
Converting Between POS and SOP Using the Karnaugh Map

When a POS expression is mapped, it can easily be


converted to the equivalent SOP form directly from
the Karnaugh map. Also, given a mapped SOP
expression, an equivalent POS expression can be
derived directly from the map. This provides a good
way to compare both minimum forms of an
expression to determine if one of them can be
implemented with fewer gates than the other.
Cont…

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 4–36 illustrates this conversion.
Exercise?
• Find
the
– SOP Expression,
Also Implement
– Draw K-Map the Simplified
– Find the Minimized SOP Logic
Expression
52

You might also like