(SMJE1113) Week 4 Boolean Algebra - 1
(SMJE1113) Week 4 Boolean Algebra - 1
(SMJE 1113)
SEMESTER 1 SESSION 2023/2024
W EEK 4
1
UTM KUALA LUMPUR
Boolean Algebra and Logic Simplification
Figure 4–1
Figure 4–2
The commutative law of addition for two variables: The commutative law of multiplication for two variables:
𝐴𝐴 + 𝐵𝐵 = 𝐵𝐵 + 𝐴𝐴 𝐴𝐴𝐵𝐵 = 𝐵𝐵𝐵𝐵
Associative Laws
• This law states that when ORing more than two • This law states that it makes no
difference in what order the variables
variables, the result is the same regardless of the
are grouped when ANDing more than
grouping of the variables. two variables
𝐴𝐴 𝐵𝐵𝐵𝐵 = 𝐴𝐴𝐴𝐴 𝐶𝐶
𝐴𝐴 + 𝐵𝐵 + 𝐶𝐶 = 𝐴𝐴 + 𝐵𝐵 + 𝐶𝐶
Distributive Law
• This law states that ORing two or more variables and then ANDing the result with a single
variable is equivalent to ANDing the single variable with each of the two or more variables
and then ORing the products.
• The distributive law also expresses the process of factoring in which the common variable A
is factored out of the product terms, for example, AB + AC = A(B + C).
• The distributive law is written for three variables as follows:
𝐴𝐴 𝐵𝐵 + 𝐶𝐶 = 𝐴𝐴𝐴𝐴 + 𝐴𝐴𝐴𝐴
Rules of Boolean Algebra
• Table 4–1 lists 12 basic rules that are useful in manipulating and simplifying Boolean expressions.
• Rules 1 through 9 will be viewed in terms of their application to logic gates.
• Rules 10 through 12 will be derived in terms of the simpler rules and the laws previously discussed.
Rule 1: 𝐀𝐀 + 𝟎𝟎 = 𝐀𝐀
Rule 2: 𝐀𝐀 + 𝟏𝟏 = 𝟏𝟏
A variable ORed with 0 is always equal to the
A variable ORed with 1 is always equal to 1.
variable.
Rule 4: 𝐀𝐀 � 𝟏𝟏 = 𝟏𝟏
Rule 3: 𝐀𝐀 � 𝟎𝟎 = 𝟎𝟎
A variable ANDed with 1 is always equal to the variable
A variable ANDed with 0 is always equal to 0.
Rule 5: 𝐀𝐀 + 𝐀𝐀 = 𝐀𝐀 � = 𝟏𝟏
Rule 6: 𝐀𝐀 + 𝑨𝑨
A variable ORed with itself is always equal to the
A variable ORed with its complement is always equal to 1.
variable.
Rule 7: 𝐀𝐀 � 𝐀𝐀 = 𝐀𝐀 � = 𝟎𝟎
Rule 8:𝐀𝐀 � 𝑨𝑨
A variable ANDed with itself is always equal to the
A variable ANDed with its complement is always equal to 0.
variable
� = 𝑨𝑨
Rule 9: 𝑨𝑨
The double complement of a variable is always
equal to the variable.
Rule 10: 𝑨𝑨 + 𝑨𝑨𝑨𝑨 = 𝑨𝑨
This rule can be proved by applying the distributive law, rule 2, and rule 4 as follows
� 𝑩𝑩 = 𝑨𝑨 + 𝑨𝑨𝑨𝑨 + 𝑨𝑨
𝑨𝑨 + 𝑨𝑨 � 𝑩𝑩 Rule 10: 𝑨𝑨 + 𝑨𝑨𝑨𝑨 = 𝑨𝑨
= 𝑨𝑨𝐀𝐀 + 𝐀𝐀𝐁𝐁 + 𝑨𝑨 � 𝑩𝑩 Rule 7: 𝐀𝐀 � 𝐀𝐀 = 𝐀𝐀
� + 𝑨𝑨
= 𝑨𝑨𝑨𝑨 + 𝑨𝑨𝑨𝑨 + 𝑨𝑨𝑨𝑨 � 𝑩𝑩 Rule 8: 𝐀𝐀 � 𝑨𝑨
� = 𝟎𝟎
� )(𝑨𝑨 + 𝑨𝑨𝑨𝑨)
= (𝑨𝑨 + 𝑨𝑨 Factoring
= 𝟏𝟏 � (𝑨𝑨 + 𝑩𝑩) � = 𝟏𝟏
Rule 6: 𝐀𝐀 + 𝑨𝑨
= 𝑨𝑨 + 𝑩𝑩 Rule 4: 𝐀𝐀 � 𝟏𝟏 = 𝟏𝟏
The proof is shown in Table 4–3, which shows the truth table and the resulting logic circuit
simplification.
Rule 12: 𝑨𝑨 + 𝑩𝑩 𝑨𝑨 + 𝑪𝑪 = 𝑨𝑨 + 𝑩𝑩𝑩𝑩
This rule can be proved as follows
1. A + 0 = A 7. A . A = A
2. A + 1 = 1 8. A . A = 0
=
3. A . 0 = 0 9. A = A
4. A . 1 = A 10. A + AB = A
5. A + A = A 11. A + AB = A + B
6. A + A = 1 12. (A + B)(A + C) = A + BC
4–3 DeMorgan’s Theorems
• DeMorgan, a mathematician who knew Boole, proposed two theorems that are an important
part of Boolean algebra. In practical terms, DeMorgan’s theorems provide mathematical
verification of the equivalency of the NAND and negative-OR gates and the equivalency of the
NOR and negative-AND gates, which were discussed in Chapter 3.
The complement of two or more ANDed variables is equivalent to the OR of the complements
of the individual variables.
� + 𝒀𝒀
𝑿𝑿𝑿𝑿 = 𝑿𝑿 �
DeMorgan’s second theorem is stated as follows: 𝑿𝑿 + 𝒀𝒀 = 𝑿𝑿𝑿𝑿
The complement of a sum of variables is equal to the product of the complements
of the variables.
The complement of two or more ORed variables is equivalent to the AND of the
complements of the individual variables.
𝑿𝑿 + 𝒀𝒀 = 𝑿𝑿𝑿𝑿
• As stated, DeMorgan’s theorems also apply to expressions in which there are more than
two variables.
• The following examples illustrate the application of DeMorgan’s theorems to 3-variable
and 4-variable expressions.
Each variable in DeMorgan’s theorems as stated
� + 𝒀𝒀
𝑿𝑿𝑿𝑿 = 𝑿𝑿 �
𝑿𝑿 + 𝒀𝒀 = 𝑿𝑿𝑿𝑿
Notice that in the preceding result you have two terms, (𝐴𝐴𝐴𝐴 + 𝐶𝐶) and (𝐴𝐴 + 𝐵𝐵𝐵𝐵) , to each of
which you can again apply DeMorgan’s theorem 𝑋𝑋 + 𝑌𝑌 = 𝑋𝑋𝑋𝑋 individually, as follows:
� + 𝑨𝑨
(𝑨𝑨𝑨𝑨 + 𝑪𝑪) + (𝑨𝑨 + 𝑩𝑩𝑩𝑩) = 𝑨𝑨𝑨𝑨 𝑪𝑪 � 𝑩𝑩𝑩𝑩
� + 𝑨𝑨
(𝑨𝑨𝑨𝑨 + 𝑪𝑪) + (𝑨𝑨 + 𝑩𝑩𝑩𝑩) = 𝑨𝑨𝑨𝑨 𝑪𝑪 � 𝑩𝑩𝑩𝑩
• Notice that you still have two terms in the expression to which DeMorgan’s theorem
can again be applied.
• These terms are (𝑨𝑨𝑨𝑨) and (𝑩𝑩𝑩𝑩).
• A final application of DeMorgan’s theorem gives the following result:
� + 𝒀𝒀
𝑿𝑿𝑿𝑿 = 𝑿𝑿 �
� + 𝑨𝑨
𝑨𝑨𝑨𝑨 𝑪𝑪 � 𝑩𝑩𝑩𝑩 = 𝑨𝑨
� (𝑩𝑩𝑩𝑩) + 𝑨𝑨
� (𝑩𝑩 �)
� + 𝑪𝑪 𝑿𝑿 + 𝒀𝒀 = 𝑿𝑿𝑿𝑿
• Although this result can be simplified further by the use of Boolean rules and laws, DeMorgan’s
theorems cannot be used any more.
Applying DeMorgan’s Theorems
• The following procedure illustrates the application of DeMorgan’s theorems and Boolean algebra to the
specific expression
𝐴𝐴 + 𝐵𝐵 𝐶𝐶̅ + 𝐷𝐷(𝐸𝐸 + 𝐹𝐹)
�
Step 1: Identify the terms to which you can apply DeMorgan’s theorems, and think of
each term as a single variable.
� + 𝑫𝑫(𝑬𝑬 + 𝑭𝑭
𝑨𝑨 + 𝑩𝑩𝑪𝑪 �)
Let:
� + 𝒀𝒀
𝑿𝑿𝑿𝑿 = 𝑿𝑿 �
𝑿𝑿 𝒀𝒀
𝑿𝑿 + 𝒀𝒀 = 𝑿𝑿𝑿𝑿
�
𝑿𝑿 = 𝑨𝑨 + 𝑩𝑩𝑪𝑪
�)
𝒀𝒀 = 𝑫𝑫(𝑬𝑬 + 𝑭𝑭
Step 2: Since 𝑿𝑿 + 𝒀𝒀 = 𝑿𝑿𝑿𝑿
� + 𝑫𝑫(𝑬𝑬 + 𝑭𝑭
𝑨𝑨 + 𝑩𝑩𝑪𝑪 �)(𝑫𝑫 𝑬𝑬 + 𝑭𝑭
� ) = (𝑨𝑨 + 𝑩𝑩𝑪𝑪 � )
𝑿𝑿 𝒀𝒀
� = 𝑨𝑨) to cancel the double bars over the left term (this is not part of DeMorgan’s
Step 3: Use rule 9 (𝑨𝑨
theorem).
�)
(𝑨𝑨 + 𝑩𝑩𝑪𝑪 �)
= (𝑨𝑨 + 𝑩𝑩𝑪𝑪
�
𝑨𝑨 + 𝑩𝑩𝑪𝑪 �
𝑫𝑫 𝑬𝑬 + 𝑭𝑭 �
= 𝑨𝑨 + 𝑩𝑩𝑪𝑪 �
𝑫𝑫 𝑬𝑬 + 𝑭𝑭
�
𝑨𝑨 + 𝑩𝑩𝑪𝑪 �
𝑫𝑫 𝑬𝑬 + 𝑭𝑭 �
= 𝑨𝑨 + 𝑩𝑩𝑪𝑪 � + 𝑬𝑬 + 𝑭𝑭
𝑫𝑫
� = 𝑨𝑨) cancel the double bars over the 𝐸𝐸 + 𝐹𝐹� part of the term
Step 5: Use rule 9 (𝑨𝑨
�
𝑨𝑨 + 𝑩𝑩𝑪𝑪 � + 𝑬𝑬 + 𝑭𝑭
𝑫𝑫 � 𝑫𝑫
= 𝑨𝑨 + 𝑩𝑩𝑪𝑪 � + 𝑬𝑬 + 𝑭𝑭
�
4–4 Boolean Analysis of Logic Circuits
FIGURE 4–18 A combinational logic circuit showing the development of the Boolean expression for
the output.
Constructing a Truth Table for a Logic Circuit
• Once the Boolean expression for a given logic circuit has been determined, a truth table that shows
the output for all possible values of the input variables can be developed.
• The procedure requires that you evaluate the Boolean expression for all possible combinations of
values for the input variables.
• In the case of the circuit in Figure 4–18, there are four input variables (A, B, C, and D) and
therefore sixteen (24 = 16) combinations of values are possible.
Evaluating the Expression
• A logic expression can be reduced to its simplest form or changed to a more convenient
form to implement the expression most efficiently using Boolean algebra.
• The approach taken in this section is to use the basic laws, rules, and theorems of Boolean
algebra to manipulate and simplify an expression.
• This method depends on a thorough knowledge of Boolean algebra and considerable
practice in its application, not to mention a little ingenuity and cleverness.
𝑨𝑨𝑨𝑨 + 𝑨𝑨 𝑩𝑩 + 𝑪𝑪 + 𝑩𝑩 𝑩𝑩 + 𝑪𝑪 = 𝑩𝑩 + 𝑨𝑨𝑨𝑨
𝐴𝐴𝐵𝐵� 𝐶𝐶 + 𝐵𝐵𝐵𝐵 + 𝐴𝐴̅ 𝐵𝐵� 𝐶𝐶 = 𝐵𝐵𝐶𝐶
�
4–6 Standard Forms of Boolean Expressions
• All Boolean expressions, regardless of their form, can be converted into either of two
standard forms: the sum-of-products (SOP) form or the product-of-sums (POS) form.
• Standardization makes the evaluation, simplification, and implementation of Boolean
expressions much more systematic and easier.
An SOP expression can be
The Sum-of-Products (SOP) Form implemented with one OR gate and
two or more AND gates.
• A product term was defined in Section 4–1 as a term consisting of the product (Boolean multiplication) of
literals (variables or their complements).
• When two or more product terms are summed by Boolean addition, the resulting expression is a sum-of-
products (SOP). Some examples are
• � 𝑩𝑩
An SOP expression can contain a single-variable term 𝑨𝑨 + 𝑨𝑨 � 𝑪𝑪 + 𝑩𝑩𝑩𝑩𝑫𝑫
�
• In an SOP expression, a single overbar cannot extend over more than one variable; however, more
than one variable in a term can have an overbar.
� 𝑩𝑩
• For example, an SOP expression can have the term 𝑨𝑨 � but not 𝑨𝑨𝑨𝑨𝑨𝑨
� 𝑪𝑪
Domain of a Boolean Expression
• The domain of a general Boolean expression is the set of variables contained in the
expression in either complemented or uncomplemented form.
• � 𝑩𝑩 + 𝑨𝑨𝑩𝑩
For example, the domain of the expression 𝑨𝑨 � 𝑪𝑪 is the set of variables 𝑨𝑨, 𝑩𝑩, 𝑪𝑪 and the
� + 𝑪𝑪𝑫𝑫
domain of the expression 𝑨𝑨𝑨𝑨𝑪𝑪 � 𝑬𝑬 + 𝑩𝑩
� 𝑪𝑪𝑫𝑫
� is the set of variables 𝑨𝑨, 𝑩𝑩, 𝑪𝑪, 𝐃𝐃, 𝐄𝐄.
AND/OR Implementation of an SOP Expression
FIGURE 4–23 This NAND/NAND implementation is equivalent to the AND/OR in Figure 4–22.
AND/OR
NAND/NAND
Conversion of a General Expression to SOP Form
Any logic expression can be changed into SOP form by applying Boolean algebra techniques.
For example, the expression 𝑨𝑨(𝑩𝑩 + 𝑪𝑪𝑪𝑪) can be converted to SOP form by applying
the distributive law: 𝑨𝑨 𝑩𝑩 + 𝑪𝑪𝑪𝑪 = 𝑨𝑨𝑨𝑨 + 𝑨𝑨𝑨𝑨𝑨𝑨
The Standard SOP Form
• So far, you have seen SOP expressions in which some of the product terms do not contain
all of the variables in the domain of the expression.
• For example, the expression 𝑨𝑨 � + 𝑨𝑨𝑩𝑩
� 𝑩𝑩𝑪𝑪 � 𝑫𝑫 + 𝑨𝑨 � 𝐷𝐷 has a domain made up of the variables
� 𝑩𝑩𝑪𝑪
𝑨𝑨, 𝑩𝑩, 𝑪𝑪, 𝐚𝐚𝐚𝐚𝐚𝐚 𝐃𝐃.
• However, notice that the complete set of variables in the domain is not represented in the
� is missing from the first term and 𝐶𝐶 or 𝐶𝐶̅ is
first two terms of the expression; that is, 𝐷𝐷 or 𝐷𝐷
missing from the second term.
• A standard SOP expression is one in which all the variables in the domain appear in each
� 𝑪𝑪𝑪𝑪 + 𝑨𝑨
product term in the expression. For example,𝑨𝑨𝑩𝑩 � 𝑩𝑩
� 𝑪𝑪𝑫𝑫 �𝑫𝑫
� + 𝑨𝑨𝑨𝑨𝑪𝑪 � is a standard SOP
expression.
• Standard SOP expressions are important in constructing
- truth tables,
- in the Karnaugh map simplification method.
• Any nonstandard SOP expression (referred to simply as SOP) can be converted to the
standard form using Boolean algebra.
Converting Product Terms to Standard SOP
• Each product term in an SOP expression that does not contain all the variables in the domain
can be expanded to standard form to include all variables in the domain and their complements.
• As stated in the following steps, a nonstandard SOP expression is converted into standard form
using Boolean algebra rule 6 (𝐴𝐴 + 𝐴𝐴̅ = 1) from Table 4–1: A variable added to its complement
equals 1.
Step 1:
Multiply each nonstandard product term by a term made up of the sum of a missing variable and its
complement.
This results in two product terms. As you know, you can multiply anything by 1 without
changing its value.
Step 2:
Repeat Step 1 until all resulting product terms contain all variables in the domain in either
complemented or uncomplemented form.
In converting a product term to standard form, the number of product terms is doubled for each
missing variable
Binary Representation of a Standard Product Term
• A standard product term is equal to 1 for only one combination of variable values.
• � 𝑪𝑪𝑫𝑫
For example, the product term 𝑨𝑨𝑩𝑩 � is equal to 1 when 𝑨𝑨 = 𝟏𝟏, 𝑩𝑩 = 𝟎𝟎, 𝑪𝑪 = 𝟏𝟏, 𝑫𝑫 = 𝟎𝟎, as shown
below, and is 0 for all other combinations of values for the variables.
� 𝑪𝑪𝑫𝑫
𝑨𝑨𝑩𝑩 � � 𝟏𝟏 � 𝟎𝟎
� = 𝟏𝟏 � 𝟎𝟎 � = 𝟏𝟏 � 𝟏𝟏 � 𝟏𝟏 � 𝟏𝟏 = 𝟏𝟏
• In this case, the product term has a binary value of 1010 (decimal ten).
• Remember, a product term is implemented with an AND gate whose output is 1 only if each of
its inputs is 1.
• Inverters are used to produce the complements of the variables as required.
• When two or more sum terms are multiplied, the resulting expression is a product-of-sums (POS).
Some examples are
� + 𝑩𝑩 𝑨𝑨 + 𝑩𝑩
𝑨𝑨 � + 𝑪𝑪
� + 𝑩𝑩
𝑨𝑨 � 𝑪𝑪 + 𝑫𝑫
� + 𝑪𝑪 � + 𝑬𝑬 (𝑩𝑩
� + 𝑪𝑪 + 𝑫𝑫)
� + 𝑪𝑪)(𝑨𝑨 + 𝑪𝑪)
𝑨𝑨 + 𝑩𝑩 (𝑨𝑨 + 𝑩𝑩
The Product-of-Sums (POS) Form a POS expression can have the term x
� + 𝑩𝑩
𝑨𝑨 � but not 𝑨𝑨 + 𝑩𝑩 + 𝑪𝑪.
� + 𝑪𝑪
Implementation of a POS Expression
Implementing a POS expression simply requires ANDing the outputs of two or more OR gates.
• So far, you have seen POS expressions in which some of the sum terms do not contain all of the
variables in the domain of the expression. For example, the expression
� + 𝑪𝑪)(𝑨𝑨 + 𝑩𝑩 + 𝑫𝑫
(𝑨𝑨 + 𝑩𝑩 � )(𝑨𝑨 + 𝑩𝑩 � + 𝑫𝑫)
� + 𝑪𝑪
• Each sum term in a POS expression that does not contain all the variables in the domain can be
expanded to standard form to include all variables in the domain and their complements.
• As stated in the following steps, a nonstandard POS expression is converted into standard form
using Boolean algebra rule 8 (𝐴𝐴 � 𝐴𝐴̅ = 0) from Table 4–1: A variable multiplied by its complement
equals 0.
Step 1: Add to each nonstandard product term a term made up of the product of the missing variable and its
complement.
This results in two sum terms. As you know, you can add 0 to anything without changing its value.
Step 2: Apply rule 12 from Table 4–1: 𝑨𝑨 + 𝑩𝑩𝑩𝑩 = (𝑨𝑨 + 𝑩𝑩)(𝑨𝑨 + 𝑪𝑪)
Step 3: Repeat Step 1 until all resulting sum terms contain all variables in the domain in either complemented or
uncomplemented form.
Binary Representation of a Standard Sum Term
• A standard sum term is equal to 0 for only one combination of variable values.
• � + 𝑪𝑪 + 𝑫𝑫
For example, the sum term 𝑨𝑨 + 𝑩𝑩 � is 0 when 𝑨𝑨 = 𝟎𝟎, 𝑩𝑩 = 𝟏𝟏, 𝑪𝑪 = 𝟎𝟎, 𝑫𝑫 = 𝟏𝟏, as
shown below, and is 1 for all other combinations of values for the variables.
� + 𝑪𝑪 + 𝑫𝑫
𝑨𝑨 + 𝑩𝑩 � = 𝟎𝟎 + 𝟏𝟏 + 𝟎𝟎 + 𝟏𝟏 = 𝟎𝟎 + 𝟎𝟎 + 𝟎𝟎 + 𝟎𝟎 = 𝟎𝟎
• In this case, the sum term has a binary value of 0101 (decimal 5).
• Remember, a sum term is implemented with an OR gate whose output is 0 only if each of its
inputs is 0.
• Inverters are used to produce the complements of the variables as required.
Step 1: Evaluate each product term in the SOP expression. That is, determine the binary numbers
that represent the product terms.
Step 2: Determine all of the binary numbers not included in the evaluation in Step 1.
Step 3: Write the equivalent sum term for each binary number from Step 2 and express in POS form.
• Recall from Section 4–6 that an SOP expression is equal to 1 only if at least one of the product
terms is equal to 1.
• A truth table is simply a list of the possible combinations of input variable values and the
corresponding output values (1 or 0).
• For an expression with a domain of two variables, there are four different combinations of those
variables (22 = 4).
• For an expression with a domain of three variables, there are eight different combinations of those
variables (23 = 8).
• For an expression with a domain of four variables, there are sixteen different combinations of
those variables (24 = 16), and so on.
• The first step in constructing a truth table is to list all possible combinations of binary
values of the variables in the expression.
• Next, convert the SOP expression to standard form if it is not already.
• Finally, place a 1 in the output column (X) for each binary value that makes the standard
SOP expression a 1 and place a 0 for all the remaining binary values.
• This procedure is illustrated in Example 4–20.
Converting POS Expressions to Truth Table Format
• Recall that a POS expression is equal to 0 only if at least one of the sum terms is equal
to 0.
• To construct a truth table from a POS expression, list all the possible combinations of binary
values of the variables just as was done for the SOP expression.
• Next, convert the POS expression to standard form if it is not already. Finally, place a 0 in the
output column (X) for each binary value that makes the expression a 0 and place a 1 for all
the remaining binary values.
• This procedure is illustrated in Example 4–21.
• Notice that the truth table in
this example is the same as
the one in Example 4–20.
• This means that the SOP
expression in the previous
example and the POS
expression in this example
are equivalent.
Determining Standard Expressions from a Truth Table
• To determine the standard SOP expression represented by a truth table, list the binary values of the input
variables for which the output is 1.
• Convert each binary value to the corresponding product term by replacing each 1 with the corresponding
variable and each 0 with the corresponding variable complement.
• For example, the binary value 1010 is converted to a product term as follows:
� 𝑪𝑪𝑫𝑫
𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏 → 𝑨𝑨𝑩𝑩 �
� 𝑪𝑪𝑫𝑫
𝑨𝑨𝑩𝑩 � � 𝟏𝟏 � 𝟎𝟎
� = 𝟏𝟏 � 𝟎𝟎 � = 𝟏𝟏 � 𝟏𝟏 � 𝟏𝟏 � 𝟏𝟏 = 𝟏𝟏
• To determine the standard POS expression represented by a truth table, list the binary values
for which the output is 0.
• Convert each binary value to the corresponding sum term by replacing each 1 with the
corresponding variable complement and each 0 with the corresponding variable.
• For example, the binary value 1001 is converted to a sum term as follows:
� + 𝑩𝑩 + 𝑪𝑪 + 𝑫𝑫
𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏 → 𝑨𝑨 �
� + 𝑩𝑩 + 𝑪𝑪 + 𝑫𝑫
𝑨𝑨 � + 𝟎𝟎 + 𝟎𝟎 + 𝟏𝟏
� = 𝟏𝟏 � = 𝟎𝟎 + 𝟎𝟎 + 𝟎𝟎 + 𝟎𝟎 = 𝟎𝟎
4–8 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.
• As you have seen, the effectiveness of algebraic simplification depends on your familiarity
with all the laws, rules, and theorems of Boolean algebra and on your ability to apply them.
• The Karnaugh map, on the other and, provides a “cookbook” method for simplification.
Other simplification techniques include the Quine-McCluskey method and the Espresso
algorithm.
• 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, but we will
discuss only 3-variable and 4-variable situations to illustrate the principles.
• A discussion of 5-variable Karnaugh maps is available on the website.
• The number of cells in a Karnaugh map, as well as the number of rows in a truth table, is equal to
the total number of possible input variable combinations.
• For three variables, the number of cells is 23 = 8. For four variables, the number of cells is 24 = 16.
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 A 3-variable Karnaugh map showing Boolean product terms for each cell.
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 A 4-variable Karnaugh map.
Cell Adjacency
• The cells in a Karnaugh map are arranged so that there is only a single-variable change
between adjacent cells.
• Adjacency is defined by a single-variable change.
• In the 3-variable map the 010 cell is adjacent to the 000 cell, the 011 cell, and the 110 cell.
The 010 cell is not adjacent to the 001 cell, the 111 cell, the 100 cell, or the 101 cell.
• Physically, each cell is adjacent to the cells that are immediately next to it on any of its four sides.
• A cell is not adjacent to the cells that diagonally touch any of its corners.
• Also, the cells in the top row are adjacent to the corresponding cells in the bottom row and the
cells in the outer left column are adjacent to the corresponding cells in the outer right column.
• This is called “wrap-around” adjacency because you can think of the map as wrapping around
from top to bottom to form a cylinder or from left to right to form a cylinder.
• Figure 4–27 illustrates the cell adjacencies with a 4-variable map, although the same rules for
adjacency apply to Karnaugh maps with any number of cells.
“wrap-around”
FIGURE 4–27 Adjacent cells on a Karnaugh map are those that differ by only one variable. Arrows
point between adjacent cells.
THANK YOU