(SMJE1113) Week 4 Boolean Algebra - 4.9
(SMJE1113) Week 4 Boolean Algebra - 4.9
(SMJE 1113)
SEMESTER 1 SESSION 2023/2024
WEEK 4
1
UTM KUALA LUMPUR
Boolean Algebra and Logic Simplification
• 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 ABC, a 1 goes in the 101 cell on a 3-variable map.
• 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.
• The following steps and the 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.
• 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 by the procedure
covered in Section 4–6 or by numerical expansion.
• Since an expression should be evaluated before mapping anyway, numerical expansion is probably the most
efficient approach.
B
010
011
110
111
̅ 𝐶𝐶,̅ 𝐴𝐴𝐵𝐵𝐵𝐵,
• The four resulting binary numbers are the values of the standard SOP terms 𝐴𝐴𝐵𝐵 ̅ 𝐴𝐴𝐴𝐴𝐶𝐶,̅ 𝑎𝑎𝑎𝑎𝑎𝑎 𝐴𝐴𝐴𝐴𝐴𝐴 .
EXAMPLE 4–25
• Map the following SOP expression on a Karnaugh map: 𝐴𝐴̅ + 𝐴𝐴𝐵𝐵� + 𝐴𝐴𝐴𝐴𝐶𝐶.̅
Solution
• The SOP expression is obviously not in standard form because each product term does not
have three variables.
• The first term is missing two variables, the second term is missing one variable, and the third
term is standard.
• First expand the terms numerically as follows:
Map each of the resulting binary values by placing a 1 in the appropriate cell of the 3-variable Karnaugh map
in Figure 4–31.
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.
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, 23 = 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.
Determining the Minimum SOP Expression from the Map
• When all the 1s representing the standard product terms in an expression are properly mapped and
grouped, the process of determining the resulting minimum SOP expression begins.
• The following rules are applied to find the minimum product terms and the minimum SOP expression:
1. Group the cells that have 1s. Each group of cells containing 1s creates one product term composed of all
variables that occur in only one form (either uncomplemented or complemented) within the group. Variables
that occur both uncomplemented and complemented within the group are eliminated. These are called
contradictory variables.
2. Determine the minimum product term for each group.
(a) For a 3-variable map:
(1) A 1-cell group yields a 3-variable product term
(2) A 2-cell group yields a 2-variable product term
(3) A 4-cell group yields a 1-variable term
(4) An 8-cell group yields a value of 1 for the expression
(b) For a 4-variable map:
(1) A 1-cell group yields a 4-variable product term
(2) A 2-cell group yields a 3-variable product term
(3) A 4-cell group yields a 2-variable product term
(4) An 8-cell group yields a 1-variable term
(5) A 16-cell group yields a value of 1 for the expression
3. When all the minimum product terms are derived from the Karnaugh map, they are summed to form the
minimum SOP expression.
Mapping Directly from a Truth Table
• You have seen how to map a Boolean expression; now you will learn how to go directly from a truth table to
a Karnaugh map.
• Recall that a truth table gives the output of a Boolean expression for all possible input variable combinations.
An example of a Boolean expression and its truth table representation is shown in Figure 4–39.
• Notice in the truth table that the output X is 1 for four different input variable combinations.
• The 1s in the output column of the truth table are mapped directly onto a Karnaugh map into the cells
corresponding to the values of the associated input variable combinations, as shown in Figure 4–39.
• In the figure you can see that the Boolean expression, the truth table, and the Karnaugh map are simply
different ways to represent a logic function.
FIGURE 4–39 Example of mapping directly from a truth table to a Karnaugh map
“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 covered in Chapter 2, 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.
• 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.
FIGURE 4–40 Example of the use of “don’t care” conditions to simplify an expression.
• The truth table in Figure 4–40(a) describes a logic function that has a 1
output only when the BCD code for 7, 8, or 9 is present on the inputs.
• If the “don’t cares” are used as 1s, the resulting expression for the function
is A + BCD, as indicated in part (b).
�C� +
• If the “don’t cares” are not used as 1s, the resulting expression is AB
�BCD; so you can see the advantage of using “don’t care” terms to get the
A
simplest expression.
4–10 Karnaugh Map POS Minimization
• 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.
� + 𝐶𝐶, a 0 goes in the 010 cell on a 3-variable map.
• For example, for the sum term A + B
• 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 that you learned in
Section 4–9.
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.
• 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.
The 0s for the standard 1s are added to the cells that do not
POS expression are contain 0s. From each cell
mapped and grouped to the 1s are grouped and a
containing a 1, a standard product
obtain the minimum POS minimum SOP expression is
term is obtained as indicated. These
expression obtained.
product terms form the standard
SOP expression
THANK YOU