Digital Electronics
19CSE204
III Semester
B. Tech. CSE
Amrita School of Engineering, Chennai
Strategy of Minimization
• Requirement:
• Find few number of groups as possible
• Find groups as large as possible. Groups of 1s (or 0s) that cover all cases
where function has a value of 1 (or 0) -> results in fewer number of input
variables in the corresponding product term (or sum term)
• Why Strategy of Minimization?
• When many input variables are there in a function -> minimum cost
implementation need to be derived
Terminology
• Literal: Each appearance of a variable, either uncomplemented or
complemented form is called a Literal
• Example: x1’x2’x3x4 has 4 literals
• Implicant: A product term that indicates the input valuation for
which a given function is equal to 1 is called an implicant
of the function.
The most basic implicants are either minterms for Product terms (and maxterms
in case of sum terms). For an n-variable function, a minterm is an implicant that
consist of n literals.
• Example: five minterms: x1’x2’x3’, x1’x2’x3, x1’x2x3’, x1’x2x3, and
x1x2x3. Finally, there are two implicants: First implicant that covers a group
of four minterms results into x1’ and second implicant that covers group of
two minterms results into x2x3.
Terminology
• Prime Implicant: An implicant is called a prime implicant if it cannot be
combined into another implicant that has fewer literals. Another way of
stating this definition is to say that it is impossible to delete any literal
in a prime implicant and still have a valid implicant.
Example: there are two prime implicants: x1’ and x2x3. It is not possible
to delete a literal in either of them.
• Cover: A collection of implicants that account for all valuations for
which a given function is equal to 1 (or 0 in case of POS) is called a
cover of that function. A number of different covers exist for most
functions. A set of all prime implicants is a cover. A cover defines a
particular implementation of the function.
f = x1’ + x2x3 is a cover here in this example.
Terminology
• Cost: Cost of a logic circuit is the number of gates plus the total number of inputs to all gates
in the circuit. we will assume that primary inputs, namely, the input variables, are available in both
true and complemented forms at zero cost.
• Example: The expression f = x1x2’ + x3x4’ has a cost of 9 because it can be implemented using two
AND gates and one OR gate.
• g = (x1x2’ + x3)’(x4’ + x5) Cost = 9 wires + 5 gates = 14
• In general, the larger the circuit, the more important the cost issue becomes.
• The main objective is to obtain a minimum-cost circuit.
Strategy for Minimization
• If a prime implicant includes a minterm for which f = 1 that
is not included in any other prime implicant, then it must be
included in the cover and is called an essential prime
implicant.
• Example: The prime implicants are essential.
• The term x2x3 is the only prime implicant that covers the
minterm m7, and x1’ is the only one that covers the minterms
m0, m1, and m2. Notice that the minterm m3 is covered by both
of these prime implicants. The minimum-cost realization of the
function is
• f = x1’ + x2x3
Steps for Minimization
• The process of finding a minimum-cost circuit involves the following steps:
1. Generate all prime implicants for the given function f .
2. Find the set of essential prime implicants.
3. If the set of essential prime implicants covers all valuations for which f = 1, then
this set is the desired cover of f . Otherwise, determine the nonessential prime
implicants that should be added to form a complete minimum-cost cover. The choice
of nonessential prime implicants to be included in the cover is governed by the cost
considerations.
Example 1 for Minimization
PI = {x1’x3, x2’x3, x3x4’, x2x3’x4, x1’x2x4}
EPI = {x3x4’, x2’x3, x2x3’x4}
Cover = {x3x4’, x2’x3, x1’x3, x2x3’x4}
Cost = 13 + 5 = 18
Four-variable function f ( x1,…, x4) =
m(2, 3, 5, 6, 7, 10, 11, 13, 14).
Example 2
The function f ( x1,…, x4) = m(0, 4, 8, 10, 11, 12, 13, 15).
PI = { x3’x4’, x1x2x3’, x1x2x4, x1x3x4, x1x2’x3, x1x2’x4’}
EPI = {x3’x4’}
Cover = {x3’x4’, x1x2x4, x1x2’x3}
f = x3’x4’ + x1x2x4 + x1x2’x3
Cost = 11 + 4 = 15
Example 3
PI = {x1’x3’x4’, x2x3’x4, x1x3x4, x2’x3x4’, x1’x2’x4’,
x1’x2x3’, x1x2x4, x1x2’x3}
EPI = {No EPI}
Cover = Either this {x1’x3’x4’, x2x3’x4, x1x3x4, x2’x3x4’}
or this{x1’x2’x4’, x1’x2x3’, x1x2x4, x1x2’x3}
Minimization of Product-of-Sums Forms
• The technique used to find the minimum-cost sum-of-products (SOP)
implementations of functions can be used with the principle of duality to obtain
minimum cost product-of-sums (POS) implementations. In this case it is the
maxterms for which f = 0 that have to be combined into sum terms that are as large
as possible. Again, a sum term is considered larger if it covers more maxterms,
and the larger the term, the less costly it is to implement.
Example 4
f = ΠM (4, 5, 6) There are three maxterms that must be covered: M4, M5, and M6.
They can be covered by two sum terms shown in
x1 x2 the figure, leading to the following implementation:
x3
00 01 11 10
0 1 1 0 0 ( x1 + x3 )
1 1 1 1 0
( x1 + x2 )
Example 5
Simplify the function in POS form-
F (A, B, C, D) = ΠM (1, 4, 9, 12, 13))
Example 6
Simplify the function
f(x1,…..,x4) = Ʃm (2, 3, 5, 6, 7, 10, 11, 13, 14)
Assuming that both the complemented and uncomplemented
versions of the input variables x1 to x4 are available at no extra
cost, the cost of this circuit in POS is 11+ 4 = 15.
But for the same function in the SOP implementation requires
cost = 13 + 5 = 18.
Hence, for the given function, the minimum cost
implementation solution is POS
Incompletely Specified Functions
• In digital systems it often happens that certain input conditions can never occur
and is a don’t-care condition. A function that has don’t-care condition(s) is said to
be incompletely specified. Don’t-care conditions, or don’t cares for short, can be
used to advantage in the design of logic circuits. Since these input valuations will
never occur, the designer may assume that the function value for these valuations
is either 1 or 0, whichever is more useful in trying to find a minimum-cost
implementation.
• If there are k don’t cares, then there are 2^k ( 2 to the power k) possible ways of
assigning 0 or 1 values to them.
Incompletely Specified Functions
Example 7- Simplify the given function using K-map.
f(A,B,C,D) = Ʃm (1,3,5,7,8,10,12) + d(0,13,14,15)
f = A’D + AD’
Example 8-
Part (a) of the figure indicates the best sum-of-products implementation. To form
the largest possible groups of 1s, thus generating the lowest-cost prime
implicants, it is necessary to assume that the don’t cares D12, D13, and D14
(corresponding to minterms m12, m13, and m14) have the value of 1 while D15
has the value of 0. Then there are only two prime implicants, which provide a
complete cover of f . The resulting implementation is
Part (b) shows how the best product-of-sums implementation can be
obtained. The same values are assumed for the don’t cares. The result is
Multiple-Output Circuits
• In practical digital systems it is necessary to implement a number of functions as
part of some large logic circuit. Circuits that implement these functions can often
be combined into a less-expensive single circuit with multiple outputs by sharing
some of the gates needed in the implementation of individual functions.
Example 9
Find minimum cost implementation for the
functions-
f1 = Ʃm (2,3,5,6,7,8,9,12,13)
f2 = Ʃm (2,3,6,7,8,9,12,13,15)
Example 9 continued….
Find minimum cost implementation for the functions-
f1 = Ʃm (2,3,5,6,7,8,9,12,13)
f2 = Ʃm (2,3,6,7,8,9,12,13,15)
(c)
Example 10
Find minimum cost implementation for the given functions-
f3 = Ʃm (1,3,5,6,7,13,15)
f4 = Ʃm (1,3,6,9,11,13,15)
Realizations of the individual functions f3 and f4 are obtained from parts (a) and (b). None of the AND
gates can be shared, which means that the cost of the combined circuit = 6 AND gates + 2 OR gates +
21 inputs = 29.
Example 10 continued…
f3 = Ʃm (1,3,5,6,7,13,15)
f4 = Ʃm (1,3,6,9,11,13,15)
The combined realization of the functions in (c), shows that the first two implicants are identical in
both expressions. The resulting circuit is given in (d).
(d)
It has the cost = 6 gates + 17 inputs = 23.
Problems for Practice - Tutorial
• Repeat the above two examples for POS implementation
1. f1 and f2 in POS
2. f3 and f4 in POS