0% found this document useful (0 votes)
17 views69 pages

Combinational Logic Circuits-2

The document discusses the concepts of Karnaugh maps (K-maps) for simplifying logic functions in combinational logic circuits, including the representation of logic functions in Sum of Products (SOP) and Product of Sums (POS) forms. It explains how to use K-maps to minimize logic expressions by grouping adjacent cells representing minterms and identifying prime implicants. The document also covers the rules for combining cells and the process of minimizing logic functions through systematic grouping of ones and zeros.

Uploaded by

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

Combinational Logic Circuits-2

The document discusses the concepts of Karnaugh maps (K-maps) for simplifying logic functions in combinational logic circuits, including the representation of logic functions in Sum of Products (SOP) and Product of Sums (POS) forms. It explains how to use K-maps to minimize logic expressions by grouping adjacent cells representing minterms and identifying prime implicants. The document also covers the rules for combining cells and the process of minimizing logic functions through systematic grouping of ones and zeros.

Uploaded by

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

3 - Combinational Logic Circuits

3.1 SOP and POS representation, K-Map up to


four variables and Quine-Mc Clusky method
for minimization of logic expressions.

1/68
Karnaugh Maps
A Karnaugh map is a graphical representation of a
logic function’s truth table. Figures on next slides
shows Karnaugh maps for logic functions of 2, 3, and
4 variables. The map for an n-input logic function is an
array with 2n cells, one for each possible input
combination or minterm. The rows and columns of a
Karnaugh map are labeled so that the input
combination for any cell is easily determined from the
row and column headings for that cell.

2/68
2, 3 variables Karnaugh Maps

3/68
4
4 variables Karnaugh Maps

5/68
Karnaugh Maps
The small number inside each cell is the corresponding
minterm number in the truth table, assuming that the
truth table inputs are labeled alphabetically from left to
right (e.g., X, Y, Z) and the rows are numbered in
binary counting order. For example, cell 13 in the
4-variable map corresponds to the truth-table row in
which W X Y Z = 1101.

6/68
Karnaugh Maps
When we draw the Karnaugh map for a given
function, each cell of the map contains the information
from the like-numbered row of the function’s truth
table—a 0 if the function is 0 for that input
combination, a 1 otherwise. We use two redundant
labelings for map rows and columns. For example,
consider the 4-variable map, the columns are labeled
with the four possible combinations of W and X,
W X = 00, 01, 11, and 10.
7/68
Karnaugh Maps
Similarly, the rows are labeled with the Y Z
combinations. These labels give us all the information
we need. However, we also use brackets to associate
four regions of the map with the four variables. Each
bracketed region is the part of the map in which the
indicated variable is 1. Obviously, the brackets convey
the same information that is given by the row and
column labels.

8/68
Karnaugh Maps
When we draw a map by hand, it is much easier to
draw the brackets than to write out all of the labels.
However, we retain the labels in the text’s Karnaugh
maps as an additional aid to understanding. In any
case, you must be sure to label the rows and columns
in the proper order to preserve the correspondence
between map cells and truth table row numbers shown
in the Karnaugh Maps.

9/68
Karnaugh Maps
To represent a logic function on a Karnaugh map, we
simply copy 1s and 0s from the truth table or
equivalent to the corresponding cells of the map.
Figures on the next slide show the truth table and
Karnaugh map for a logic function. To reduce the
clutter in maps we may copy only the 1s or the 0s, not
both.

10/68
Karnaugh Maps

11/68
Karnaugh Maps
There is a very important reason for the “strange”
ordering of the row and column numbers in a
Karnaugh map. Each cell corresponds to an input
combination that differs from each of its immediately
adjacent neighbors in only one variable. For example,
cells 5 and 13 in the 4-variable map differ only in the
value of W. In the 3- and 4-variable maps,
corresponding cells on the left/right or top/bottom
borders are less obvious neighbors; for example, cells
12 and 14 in the 4-variable map are adjacent because
they differ only in the value of Y. 12/68
Karnaugh Maps
Each input combination with a “1” in the truth table
corresponds to a minterm in the logic function’s
canonical sum. Since pairs of adjacent “1” cells
in the Karnaugh map have minterms that differ in only
one variable, the minterm pairs can be combined into a
single product term using the generalization of
theorem T10, term · Y + term · Y′ = term. Thus, we
can use a Karnaugh map to simplify the canonical sum
of a logic function.
13/68
Karnaugh Maps
Consider cells 5 and 7 and their contribution to the
canonical sum for this function:
F = … + X · Y′ · Z + X · Y · Z
F = … + (X · Z)· Y′ + (X · Z)· Y
F = … + (X · Z)
Using T10

14/68
Karnaugh Maps
Remembering wrap around, we see that cells 1 and 5
are also adjacent and can be combined:
F = X′ · Y′ · Z + X · Y′ · Z +…
F = X′·(Y′· Z) + X·(Y′· Z) +…
F = (Y′· Z) +…
Using T10

15/68
Karnaugh Maps
In general, we can simplify a logic function by
combining pairs of adjacent 1-cells (minterms)
whenever possible, and writing a sum of product terms
that cover all of the 1-cells. Figure next slide shows
the result for our example logic function. We circle a
pair of 1s to indicate that the corresponding minterms
are combined into a single product term.

16/68
Karnaugh Maps
X′·Y·Z′

Y′·Z

17/68
Karnaugh Maps
The corresponding AND-OR circuit is shown below

Y′·Z

X′·Y·Z′

18/68
Karnaugh Maps
In many logic functions, the cell-combining procedure
can be extended to combine more than two 1-cells into
a single product term. For example, consider the
canonical sum for the logic function F = ∑X,Y,Z(0, 1, 4,
5, 6). We can use the algebraic manipulations of the
previous examples iteratively to combine four of
the five minterms:
F = X′·Y′·Z′ + X′·Y′·Z + X·Y′·Z′ + X·Y′·Z + X·Y·Z′

19/68
Karnaugh Maps
F = X′·Y′·Z′ + X′·Y′·Z + X·Y′·Z′ + X·Y′·Z + X·Y·Z′
= [(X′·Y′)·Z′ + (X′·Y′)·Z] + [(X·Y′)·Z′ + (X·Y′)·Z] +
X·Y·Z′
= [(X′·Y′)] + [(X·Y′)] + X·Y·Z′
= [X′·(Y′) + X·(Y′)] + X·Y·Z′
= (Y′) + X·Y·Z′

20/68
Karnaugh Maps
In general, 2i 1-cells may be combined to form a
product term containing n – i literals, where n is the
number of variables in the function.
A precise mathematical rule determines how 1-cells
may be combined and the form of the corresponding
product term:
• A set of 2i 1-cells may be combined if there are i
variables of the logic function that take on all 2i
possible combinations within that set, while the
remaining n – i variables have the same value
throughout that set.
21/68
Karnaugh Maps
The corresponding product term has n - i literals,
where a variable is complemented if it appears as 0 in
all of the 1-cells, and uncomplemented if it appears as
1.
Graphically, this rule means that we can circle
rectangular sets of 2n 1s, literally as well as
figuratively stretching the definition of rectangular to
account for wraparound at the edges of the map. We
can determine the literals of the corresponding product
terms directly from the map; for each variable we
make the following determination:
22/68
Karnaugh Maps
• If a circle covers only areas of the map where the
variable is 0, then the variable is complemented in the
product term.
• If a circle covers only areas of the map where the
variable is 1, then the variable is uncomplemented in
the product term.
• If a circle covers both areas of the map where the
variable is 0 and areas where it is 1, then the variable
does not appear in the product term.
23/68
Karnaugh Maps
A sum-of-products expression for a function must
contain product terms (circled sets of 1-cells) that
cover all of the 1s and none of the 0s on the map.
The Karnaugh map for our most recent example, F
= ∑ X,Y,Z(0, 1, 4, 5, 6), is shown in Figure on next
slide. We have circled one set of four 1s,
corresponding to the product term Y′, and a set of two
1s corresponding to the product term X ·Z′. Notice that
the second product term has one less literal than the
corresponding product term in our algebraic solution
(X·Y·Z′).
24/68
Karnaugh Maps

(Y′) + X·Y·Z′ = (Y′) + X·Z′


A+A′B = (A+A′)·(A+B) = A+B Using T8′ and T5
25/68
Karnaugh Maps
By circling the largest possible set of 1s containing
cell 6, we have found a less expensive realization of
the logic function, since a 2-input AND gate should
cost less than a 3-input one. The fact that two different
product terms now cover the same 1-cell (4) does not
affect the logic function, since for logical addition 1 +
1 = 1, not 2! The corresponding two-level AND/OR
circuit is shown in figure on next slide.

26/68
Karnaugh Maps

X·Z′

27/68
Simplification using K-Maps
The process of simplification involves grouping of
minterms and identifying prime-implicants (PI) and
essential prime-implicants (EPI).
A prime-implicant is a group of minterms that cannot
be combined with any other mintern or groups. An
essential prime-implicant is a prime-implicant in
which one or more minterms are unique. It contains at
least one minterm which is not contained in any other
prime implicant.
28/68
Grouping Two adjacent Ones
If there are two adjacent ones on the map, these can be
grouped together and the resulting term will have one
less literal than the original two terms. It can be
verified for each of the groupings of two ones as given
in table on next slide.

29/68
Grouping Two adjacent Ones

30/68
Grouping Two adjacent Ones
Simplify the K-Map shown in Figure 5.9

31/68
Grouping Two adjacent Ones
Combining cells (0,4) and (3,7) we get B′C′+BC
Here B′C′ and BC are the two prime implicants, we
also observe that both the groups are the essential
prime implicants.

32/68
Grouping Four adjacent Ones
Four cells form a group of four adjacent ones if two of
the literals associated with the minterms/maxterms are
not the same and the other literals are the same. Table
on next slide gives all possible groups of four adjacent
ones for each cell in a 3-variable map. In case of
2-variable map, there is only one possibility
corresponding to all the four cells, and the simplified
expression will be Y = 1. That goes to say Y is always
equal to 1 independent of the variables.

33/68
Grouping Four adjacent Ones

34/68
Grouping Four adjacent Ones
Simplify the K-Map shown in Figure 5.10

35/68
Grouping Four adjacent Ones
Combining cells (3,7,15,11) and (0,1,8,9) we get CD+
B′C′.
Here CD and B′C′ are the two prime implicants, we
also observe that both the groups are the essential
prime implicants.

36/68
Grouping Eight adjacent Ones
Eight cells form a group of eight adjacent ones if three
of the literals associated with the minterms/maxterms
are not the same and the other literals are the same. In
case of 3-variable map, there is only one possibility
corresponding to all the eight cells, and the simplified
expression will be Y = 1. That goes to say Y is always
equal to 1 independent of the variables. Table on next
slide gives all possible groups of eight adjacent ones in
a 4-variable map.

37/68
Grouping Eight adjacent Ones

38/68
Grouping Eight adjacent Ones

39/68
Grouping Eight adjacent Ones

The first group of Eight adjacent cells


0,4,12,8,1,5,13,9 gives the simplified expression as C′
Similarly the second group of Eight adjacent cells
0,4,12,8,2,6,14,10 gives the simplified expression as
D′
And so on…

40/68
K-maps representations for
minterms/maxterms
Figures show the minterm/maxterm corresponding to
each cell and the term is written inside the cell for
clear understanding.

41/68
K-maps representations for
minterms/maxterms

42/68
K-maps representations for
minterms/maxterms

43/68
K-maps representations for
minterms/maxterms

44/68
Grouping adjacent Zeros

Instead of making groups of ones, we can also make


groups of zeros. The procedure is similar to the one
used above.
1. Group of two adjacent zeros result in a term with
one literal less than the number of variables. The
literal which is not the same in the two maxterms gets
eliminated.

45/68
Grouping adjacent Zeros

2. Group of four adjacent zeros result in a term with


two literals less than the number of variables. The two
literals which are not the same in all the four maxterms
gets eliminated.
3. Group of eight adjacent zeros result in a term with
three literals less than the number of variables. The
three literals which are not the same in all the eight
maxterms gets eliminated.

46/68
Grouping adjacent Ones or Zeros

We have considered groups of 2, 4, and 8 adjacent


ones or zeros. The same logic can be extended to 16,
32 and 64 adjacent ones or zeros which occur in
K-maps with more than 4 variables.

47/68
Minimization of Logic Function
For minimizing a given expression in SOP form from
K-Map.
1. Identify the ones which cannot be combined with
any other ones and encircle them. These are
essential prime implicants.
2. Identify the ones that can be combined in groups of
two in only one way. Encircle such groups of ones.
3. Identify the ones that can be combined with three
other ones to make a group of 4 adjacent ones, in
only one way. Encircle such groups of ones.
48/68
Minimization of Logic Function
4. Identify the ones that can be combined with seven
other ones to make a group of 8 adjacent ones, in
only one way. Encircle such groups of ones.
5. After identifying the essential groups of 2, 4, and 8
ones, if there still remains some ones which have
not been encircled then these are to be combined
with each other or with other already encircled
ones. Of course, we should combine the left over
ones in largest possible groups and in as few
groupings as possible.
49/68
Minimization of Logic Function
In this, the groupings may not be unique and we
should make the groupings in an optimal manner. The
logic function consisting of the prime implicants
obtained in steps 1 to 4 and the prime implicants
obtained in step 5 will be the minimised function.

50/68
Minimization of Logic Function
Minimize the 4-variable logic function using K-map
F(A,B,C,D) = ∑m(0,1,2,3,5,7,8,9,11,14)
1. Draw the K-Map for 4-variables as shown on next
slide.
2. Encircle 1 in cell 14 which cannot be combined
with any other 1. The term corresponding to this is
ABCD′.
3. There are at least two possible ways for every 1
forming groups of two adjacent ones. Therefore we
ignore it for the time being and go for the next step.
51/68
Minimization of Logic Function

52/68
Minimization of Logic Function
4. There is only one possible group of four adjacent
ones involving each of the cells 8, 5, 7, 11 and 2
and these are (0,1,8,9), (1,5,3,7), (1,9,3,11) and
(0,1,3,2) respectively. Encircle these groups. The
terms corresponding to these groups are B′C′, A′D,
B′D, and A′B′ respectively.
5. Since all the ones have been encircled the
minimized equation is F(A,B,C,D) = ABCD′ + B′C′
+ A′D + B′D + A′B′

53/68
Minimization of Logic Function

Minimize the 4-variable logic function using K-map


from the truth table given on next slide.

54/68
Minimization of Logic Function

55/68
Minimization of Logic Function

The function may be represented as F(A,B,C,D) =


∑m(0,1,2,3,7,8,9,10,11,12,13)
1. Draw the K-Map for 4-variables as shown on next
slide.
2. The ones that can be combined in groups of two in
only one way is the 1 at 7. Encircle this group of
ones (3,7). The term corresponding to this group is
A′CD.

56/68
Minimization of Logic Function

57/68
Minimization of Logic Function
3. There is only one possible group of four adjacent
ones involving each of the cells 12 and 13 and this
is (8,9,12,13). The term corresponding to this group
is AC′.
4. There is only one possible group of eight adjacent
ones involving each of the cells 0,1,2,3,8,9,10,11
and this is (0,1,2,3,8,9,10,11). The term
corresponding to this group is B′.
5. Since all the ones have been encircled the
minimized equation is F(A,B,C,D) =
A′CD+AC′+B′
58/68
Minimization of POS form
For minimizing a given expression in POS form or for
a given truth table we write zeros in the cells
corresponding to the maxterms for 0 outputs. The
K-Map is simplified by following the same procedure
as used for SOP form with ones replaced by zeros. In
this, groups of zeros are formed rather than groups of
ones.

59/68
Minimization of POS form

60/68
Minimization of POS form
Minimize the 4-variable logic function using K-map
F(A,B,C,D) = ∑m(0,1,2,3,5,7,8,9,11,14).
This function is represented in POS form as
F(A,B,C,D) = ∏M(4,6,10,12,13,15)
1. Draw the K-Map for 4-variables as shown on next
slide.
2. Encircle 0 in cell 10 which cannot be combined
with any other 0. The term corresponding to this is
A′+B+C′+D.

61/68
Minimization of POS form

62/68
Minimization of POS form
3. The zeros that can be combined in groups of two in
only one way are the 0’s at 4,6,12,15. Encircle
these groups of zeros (4,6), (12,13) and (13,15).
The terms corresponding to these groups are
(A+B′+D), (A′+B′+C) and (A′+B′+D′).
4. Since all the zeros have been encircled the
minimized equation is F(A,B,C,D) = (A′+B+C′+D)
·(A+B′+D)·(A′+B′+C)·(A′+B′+D′).

63/68
Minimization of POS form
If we compare the minimizations obtained in both the
forms SOP and POS, we observe that the number of
terms are not the same in the two minimizations. In
fact, in general the two minimizations will not have
the same number of terms and will require different
quantities of hardware. Therefore one can obtain both
minimizations and select the one which requires
minimum hardware.
F(A,B,C,D) = ABCD′ + B′C′ + A′D + B′D + A′B′
F(A,B,C,D) = (A′+B+C′+D)·(A+B′+D)·(A′+B′+C)·
(A′+B′+D′). 64/68
Minimization of POS form
Minimize the 4-variable logic function using K-map
from the truth table given on next slide.

65/68
Minimization of POS form

66/68
Minimization of Logic Function

The function may be represented as F(A,B,C,D) =


∏M(4,5,6,14,15)
1. Draw the K-Map for 4-variables as shown on next
slide.
2. The zeros that can be combined in groups of two in
only one way are the 0’s at 4,5,6 and 15. Encircle
these groups of zeros (4,5), (6,14) and (14,15). The
terms corresponding to these groups are (A+B′+C),
(B′+C′+D) and (A′+B′+C′),

67/68
Minimization of Logic Function

68/68
Minimization of Logic Function

Since all the zeros have been encircled the minimized


equation is (in the POS form)
F(A,B,C,D) = (A+B′+C)·(B′+C′+D)·(A′+B′+C′).

The minimized equation in SOP form was


F(A,B,C,D) = A′CD+AC′+B′

69/68

You might also like