Professional Documents
Culture Documents
Module 1 Printj
Module 1 Printj
PRINCIPLES OF COMBINATION
LOGIC
GANESH Y
Dept. of ECE RNSIT
PDF Watermark Remover DEMO : Purchase from www.PDFWatermarkRemover.com to remove the watermark
Module -1
Principles of Combination Logic
SYLLABUS
Principles of combination logic: Definition of combinational logic, canonical forms,
Generation of switching equations from truth tables, Karnaugh maps-3,4,5 variables,
incompletely specified functions (Don’t care terms) Simplifying Max term equations,
Quine-McCluskey minimization technique, Quine-McCluskey using dont care terms,
Reduced prime implicants Tables. (Text 1, Chapter 3)
Y
Truth Tables of Basic Logic Gates
H
ES
N
A
G
Y
Y be the set of m output variables {y0, y1, ... , ym-1} . The combinational function F,
operate on the set X, to produce the output variable set, Y. The output is thus related
to input as
Y = F (X)
H
The relationship between the input and output variables can be expressed in
equations, logic diagrams, or truth tables. A truth table specifies the input
conditions under which the outputs are true or false (1 or 0).
Problem Statements to Truth Tables
ES
N
A
is correctly accomplished.
• The problem is then "rewritten" in the form of a truth table.
• From the truth table, the switching equations can be written and simplified and
the logic diagram drawn.
• The logic diagram can be realized using any one of the three-main digital
integrated circuit families: transistor- transistor logic (TTL), emitter coupled
logic (ECL), or complementary metal-oxide silicon (CMOS).
Y
H
ES
Example 2: An electric motor powering a conveyor used to move material is to be turned
on when one of two operators is in position, if material is present to be moved and if the
protective interlock switch is not open.
Solution: Input and output variables are to be expressed in binary; that is, if operator1
is in position then the associated variable is a logical 1. The motor is running (on) if its
output control variable is a 1, and the motor is off if the variable is a 0.
N
Fig. 3 shows a simple diagram of the conveyor system. The first task is to identify the
input and output variables and to assign names to them.
A
G
Y
Because four input variables exist we know that 16 combinations can occur;
24=16.The truth table describing the input/output relationship is illustrated in
fallowing table
To turn on the motor one of the two operators must be present, material must be
present, and the interlock switch must be closed. Such a system may be found in any
H
number of industrial environments. The actual control may be implemented in any
number of ways.
Each element in the set of conditions that causes the output to be a logical 1 is a
term in the output equation, which is written
ESM= a'bms + ab'ms + abms
When either one or both of the two operators, represented by variables a and b, is
present, material is present (m = 1), and the interlock switch is closed (s 1), then
the motor, represented by the output variable M, is started.
a b m s M
N
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
A
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 1
G
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1
Y
Solution:
H
ES
N
A
G
Y
three sources, the output conveyor must be turned off. If no product is available, the
respective source conveyor must be turned off.
Solution: A diagram illustrating the conveyor system with the product switches and
motor helps us to visualize the problem and define the variables.
H
ES
N
Y
inputs that cause a given output to be true.
H
variable, then both X and X' would be literals.
Product term A product term is a literal or the logical product (AND) of multiple
literals. For instance, let X, Y, and Z be binary variables. Then a representative product
term could be X, XY, or X'YZ.
ES
Sum term A sum term is a literal or the logical OR of multiple literals. For instance, let
X, Y, and Z be binary variables. Then a representative product term could be X, X’+Y, or
X'+Y’+Z.
Sum of products A sum of products (SOP) is the logical OR of multiple product terms.
Each product term is AND of binary literals. For example, XY' + X' + YZ+ XY'Z' is a SOP
N
expression.
Product of sums A product of sums (POS) is the logical AND of multiple sum terms.
Each sum term is OR of binary literals. For example (X + Y') (X + Y + Z')(Y' + Z') is a POS
expression.
A
Minterm A minterm is a special case product (AND) term. A minterm is a product term
that contains all of the input variables (each literal no more than once) that make up a
Boolean expression.
G
Maxterm A maxterm is a special case sum (OR) term. A maxterm is a sum term that
contains all of the input variables (each literal no more than once) that make up a
Boolean expression.
Canonical sum of products A canonical sum of products is a complete set of minterms
that defines when an output variable is a logical 1. Each minterm corresponds to the
row in the truth table where the output function is 1.
Y
H
ES
Minterm and maxterm designations for three variables
N
CANONICAL FORMS
Often switching equations are written in a sum-of-products (SOP) form, or in a
product-of-sums form (POS) that is not canonical. By this we mean that each term may
not contain all of the original variables used to express the output variable.
A
To place a SOP equation into canonical form using Boolean algebra, we do the
following:
1. Identify the missing variable(s) in each AND term.
G
2. AND the missing term and its complement with the original AND term,
xy (z + z').
Because (z + z') = 1, the original AND term value is not changed.
3. Expand the term by application of the property of distribution, xyz + xyz'.
4. Reduce the expression by omitting repeated product terms if any. Because A+ A= A.
Y
Example 1:
H
ES
N
A
Example 2:
G
H
ES
N
A
G
Y
This means that output variable P is a function of the set of input variables {a, b, c}, with
input variable a being the most significant one.
The π (pi) sign is used to indicate product of sums canonical (POS) form.
Example 1: Write the canonical minterm and maxterm expressions for the following
table
H
a b m s M
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0
ES 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 1
1 0 0 0 0
N
1 0 0 1 0
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
A
1 1 1 0 0
1 1 1 1 1
The minterm expression for the output variable, M, is
M = f(a, b, m, s) = a'bms + ab’ms + abms = ∑(7, 11, 15)
G
Y
H
ES
Example 3: Express the following POS equations in a maxterm list (decimal notation)
form:
N
A
G
Y
H
ES
N
A
G
Y
H
Representing Standard POS on K-Map
A Boolean expression in the product of sums can be plotted on the Karnaugh map by
placing a 0 in each cell corresponding to a term (maxterm) in the expression. Remaining
cells are filled with ones.
ES
N
A
G
Y
H
ES
N
A
G
When adjacent 1s are grouped then we get result in the sum of products form; otherwise
we get result in the product of sums form.
Y
H
ES
N
A
G
Y
H
ES
N
A
G
H
ES
N
A
G
Illegal Grouping
Y
6. Form the simplified expression by summing product terms of all the groups.
Example 1:
H
ES
N
A
G
Y
H
ES
N
Step 1: Fig. (a) shows the K-map for four variables and it is plotted according to the
A
given expression.
Step 2: Cell 2 is the only cell containing a 1 that is not adjacent to any other 1. It is
referred to separately as group 1.
Step 3: 1 in the cell 9 is adjacent only to 1 in the cell 13. This pair is combined and
G
referred to as group 2.
Step 4: There is no octet, but there is quad cells 4, 5, 12 and 13 form a quad. This quad
is combined and referred to as group 3.
Step 5 : All l s have already grouped.
Step 6: Each group generates a term in the expression for Y. In group 1 variable is not
eliminated. In group 2 variable B is eliminated and in group 3 variables A and D are
eliminated and we get,
Y = A’B’CD’ + AC’D + BC’
Y
7. Groups may be wrapped around the map. The leftmost cell in a row may be grouped
with the rightmost cell and the top cell in a column may be grouped with the bottom cell.
8. A cell may be grouped more than once. The only condition is that every group must
have at least one cell that does not belong to any other group. Otherwise, redundant terms
H
will result.
9. We need not group all don't care cells, only those that actually contribute to a maximum
simplification.
10. All above rules are stated considering the SOP simplification. In case of POS
ES
simplification all rules are same except O (zero) takes place of 1 (one).
Example 3: Reduce the following four variable function to its minterm sum of products
form: Y=f(A,B,C,D)=∑(0,2,3,8,10,11,12,14)
N
A
G
Step 1 : Fig. (a) shows the K-map for four variables and it is plotted according to the
given expression.
Step 2 : There are no isolated ls.
Step 3: There are no such ls which are adjacent to only one other 1.
Y
H
ES
N
Example 5:
A
G
Solution: The given function is not in the standard sum of products form. It is converted
into standard SOP form as given below.
Y
H
ES
N
Y
Example 8: Example 9:
H
ES
Example 10:
N
A
Example 11:
G
Y
H
ES
Example 12 (c) & 12 (d):
N
A
G
Y
H
Example 12 (g):
ES
N
A
G
Y
For example, consider the truth table of odd-parity generator for a 4-bit BCD Number
Example 1:
H
ES
N
A
Truth table for odd parity generator with 4-bit BCD input
The Boolean function for odd parity generator with 4-bit BCD input can be expressed in
minterm canonical formula as,
G
Y
H
To form a quad of cells 0, 1, 2 and 3 the don't care conditions 0 and 2 are replaced by 1s.
The remaining don't care condition is replaced by 0 since it is not required to form any
group. With these replacements, we get the simplified equation as
ES
Example 3: Reduce the following function using Karnaugh map technique.
f (A, B, C, D) = ∑ (5, 6, 7, 12, 13) + ∑ d (4, 9, 14, 15)
N
A
G
To form a octet of cells 4, 5, 6, 7, 12, 13, 14 and 15 the don't care conditions 4, 14 and15
are replaced by ls. The remaining don't care condition 9 is replaced by 0 to get simplified
function as,
f (A, B, C, D) = B
Y
To form two quads both the don't care conditions are replaced by ls and we get,
f (A, B, C) = A′ + C
H
Example 5: Reduce the following function using Karnaugh map technique.
f (W, X, Y, Z) = ∑ (0, 7, 8, 9, 10, 12) + ∑ d (2, 5, 13).
ES
N
A
G
H
ES
N
A
G
Y
H
ES
N
A
G
Y
H
ES
N
2. Alternative stack numbering version of the five-variable K-map
A
G
Y
H
Example 1: Simplify the Boolean function.
f (A, B, C, D, E) = ∑ (0, 2, 4, 6, 9, 11, 13, 15, 17, 21, 25, 27, 29, 31)
ES
N
A
G
f (A, B, C, D, E) =A′B′E′+AD′E+BE
Example 2: Simplify the Boolean function.
f (A, B, C, D, E) = ∑ (0, 5, 6, 8, 9, ,10, 11, 16, 20, 24, 25, 26, 27, 29, 31)
Y
variable (n); or a set of variables (n0 + n1 +……….. + nm) ORed together.
4. Each reduced EPI (ORed term) is ANDed with any other OR terms
(xa + …… + xn) (xb + ……….+ xm)
Example 1: Simplify the function G = f(a, b, c, d) = π (0, 4, 5, 7, 8, 9, 11, 12, 13, 15)
H
ES
N
Y
H
ES
Another way to view simplification of maxterms is to consider them as minterms (i.e., as
if they were 1s), write the simplified expression, which gives the complement of the
desired function, and then apply DeMorgan's theorem to complement the result.
Example 4: Simplify the function f(a, b, c, d) = π ( 0, 2, 3, 8, 9, 12, 13, 15)
N
A
G
Y
H
2) Design a logic circuit with inputs P, Q, R so that output S is high whenever P is
ES
zero or whenever Q = R = 1.
N
A
G
Y
4) Design a logic circuit that has 4 inputs, the output will only be high when the
H
majority of the inputs are high. Use K-map to simplify.
ES
N
A
G
5) The input to a combinational logic circuit is a 4-bit binary number. Design the
logic circuit with minimum hardware for the following.
i) Output y1 = 1 if the input binary number is 5 or less than 5.
ii) Output y2 = 1 if the input binary number is 9 or more than 9.
Y
H
7) Using K-map, determine the minimal sum of product expression and realize the
ES
simplified expression using only NAND gates.
f (w, x, y, z) = π (0, 2, 3, 7, 8, 9, 10)
The above expression can be written as f(w, x, y, z) = ∑ (1, 4, 5, 6, 11, 12, 13, 14, 15)
N
A
G
Y
H
9) f (a, b, c, d) = ∑ (1,2,3,5,6,7,11,12,13,14,15)
for the above expression:
ES
i) Draw the logic diagram using AOI logic for minimal sum. Obtain minimal sum
using K-map.
ii) Find all the prime implicants and essential prime implicants.
N
A
G
Y
H
ES
N
A
G
11) Find minimal sum and minimal product for the following function using K-map
f (a, b, c, d) =∑ (6,7,9,10,13) + ∑ d (1,4,5,11,15).
Y
contain the same number of ls.
H
ES
N
A
Group 0 contains no ls equal to 0; group 1 contains only those minterms that have a single
1 { 1, 2, 8}; group 2 contains minterms with two ls {3, 6, 9}; group 3 contains minterms
with three ls {7, 14}; and group 4 contains minterms with four ls {15}.
G
Step 2: Create a new table showing the minterms in group n that matched with those
from group n + 1 such that they differ in only one position. This is the equivalent to x +
x' = 1; that is, ab' + ab = a.
Eliminated variable bit positions are indicated by the dash (-). This corresponds to
a′b′c′d' + a'b'c'd = a′b'c′(d + d') = a′b′c′-
When all of the minterms in group 0 have been compared with those in group 1, we
compare the minterms in group 1 with those in group 2. This process is repeated until all
of the minterms in each group have been compared to those in the next higher group.
Y
H
ES
N
As each minterm from a group, combines with a minterm in the next higher group it is
checked (✓), indicating that it is now part of a larger group. If a minterm did not combine
A
with another, then no check would be made. If a term does not simplify, it is a prime
implicant.
Step 3: All of the adjacent minterm groups are compared to see if groups of four can be
G
H
Step 5: All nonchecked minterm groups are now considered to be prime implicants.
Step 6: All of the prime implicants are formed into a prime-implicant table as shown
The prime implicant table lists each of the minterms contained in the original switching
ES
equation across the top of the table. Each prime implicant is listed vertically in two forms,
PI terms and the decimal list of minterms that make up the PI.
N
A
G
Step 7: Evaluate the prime implicants by circling those minterms that are contained in
only one prime implicant (only one x in a column).
Note that minterms {8, 9, 14, 15} meet this condition. Circled minterms represent
essential prime implicants (EPI). Minterms {0, 1, 8, 9} and {6, 7, 14, 15} are essential
prime implicants. Minterms { 2, 3} are contained in two prime implicants, {0, 1, 2, 3}
and {2, 3, 6, 7}. We need one or the other of these prime implicants to cover minterms
in the equation but not both. This implies that two equally simplified results are possible.
We can take our pick:
Y
number of ls. Indicate the don't care terms by using a * symbol. Don't care terms are
never included as prime implicants by themselves.
H
ES
N
Step 2: Compare terms in group n, including don't care terms, with terms in group n + 1,
looking for a single variable change. Treat don't care terms as a 1 in finding prime
implicants.
A
G
Y
Step 4: Construct a prime implicant chart and determine essential prime implicants. Treat
H
any don't care terms not part of a group containing a minterms as 0s. They do not need
to be covered.
ES
N
Each is a candidate for becoming an EPI. However. set {8*, 9*, 10*, 11 *} contains only
don't care terms and is, therefore, not a PI.
A
Y
H
ES
The reduced prime-implicant table obtained by removing the essential rows and the
N
columns covered by the essential prime implicants is shown in Table (b).
A
G
Y
H
The final reduced table, shown in Table(c), contains two columns with a single cross.
Therefore, the corresponding rows must be contained in some minimal sum. These rows,
ES
marked with a double asterisk, are called secondary essential rows. Note that, while
essential prime implicants occur in every minimal sum, secondary essential prime
implicants may not occur in some of the minimal sums.
After removing from Table (c) those columns that have a cross in the rows corresponding
to the secondary essential prime implicants, we obtain an empty table. Thus, a minimal
sum for F is
N
A
G
Y
H
ES
N
(2) F (A, B, C, D) = ∑ (2, 4,5, 9, 12, 13)
A
G
Y
H
ES
N
A
G
Y
H
ES
N
A
G
Y
H
ES
N
A
G
Y
H
ES
N