0% found this document useful (0 votes)
34 views28 pages

Chapter 4 Boolean Algebra

Uploaded by

leaderkoud
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)
34 views28 pages

Chapter 4 Boolean Algebra

Uploaded by

leaderkoud
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/ 28

Chapter 3 Boolean Algebra

Chapter 4: Boolean Algebra and Logic Simplification


1. Objectif of this chapter

In this chapter, we will study logic gates, which are the elementary blocks of logic circuits, and
we will see how it is possible to describe their operation using Boolean algebra. Additionally,
we will teach you how to build logic circuits by combining gates and how Boolean algebra
manages to describe and analyse them.

2. Basic Notation

Before delving into this topic, it's essential to familiarize ourselves with some fundamental notations.

Boolean Algebra created by George Boole. It is a convenient and systematic way of expressing and
analyzing the operations and the mathematics of logic circuits

Logical Variables These are like switches that can only be in one of two states: 0 or 1
Logical 0 (LOW or False):
▪ Think of it as "off" or "no electricity."
▪ In circuits, it usually means 0 volts.
Logical 1 (HIGH or True):
▪ Think of it as "on" or "yes, electricity is flowing."
▪ In circuits, it means there’s a higher voltage.

Logical Function is a mathematical function X = f (A,B,C..) describes the relation between the inputs
(A, B, C,…) as variables and the outputs X.
Example: If you press a button (input A), the light turns ON (output X).

Logical Operators takes one or more logical values as input and provides a single logical value as
out-put. Two types of operators are distinguished: basic and combined.

Combinational Logic In this type of system, the outputs depend only on


the inputs at that moment.
Example: A calculator key only works when you press it—there’s no
memory of what was pressed before

Truth table lists all possible combinations of its inputs and their corresponding outputs.
The number of possible input combinations is based on how many inputs there are. To find the total
combinations:
Use the formula: PC = 2ᴺ, where N is the number of inputs.

1
Chapter 3 Boolean Algebra

-For two input variables: N = 22 = 4 combinations Input 1 Input Input 3 Output (X)
(A) 2(B) (C)
-For three input variables: N = 23 = 8 combinations
0 0 0 0
-For four input variables: N = 24 = 16 combinations 0 0 1 0
Example: Draw the truth table of the pervious combinational 0 1 0 0
system. 0 1 1 0
1 0 0 0
1 0 1 0
We have 3 inputs → Pc = 23 => 8 possible combinations of inputs 1 1 0 0
And 1 output X= A+B+C 1 1 1 1

3. Logical operators
Basic operators:
3.1. Negation (NOT gate) Also known the complement
• it has one input and one output.
• It represents the inverse(complement) of a variable.
• It is indicated by a bar over the variable (overbar 𝑨 ̅ ).
The Logical NOT Gate
A NOT gate, more commonly known as an inverter, always has only one input. Its output takes the
logical level opposite to the logical level of the input. Input Output
(A) ̅)
(X=𝑨
0 1
1 0

The logic expression (function) of the inverter gate is given by the following equation:
✓ If A = 1, then 𝑋 = 𝐴̅ = 0.
✓ If A = 0, then X= 𝐴̅ = 1. The complement of the variable A is read as “not A” or “A bar.”

The symbol used for the NOT gate is a triangle with a circle at the output, The circle is used also in
other gates to indicate a negation
Example:
Binary
The ones complement in logic circuits is consider
as an inverter.
The bits of the binary number are applied to the
inverter inputs and the 1’s complement of the
number appears on the outputs.
1’s complement

3.2. Conjunction (AND gate)


• Conjunction is a two bits or more operation, it provides a true value only if all bits are
true(1).
• When A and B are combined using the logical AND function, the result X is symbolically
expressed by the following expression:
X = A AND B = A . B = AB
• There are two symbols used for AND gates

2
Chapter 3 Boolean Algebra

• The following table represents the truth table of the AND gate.
Input 1 Input 2 Output
(A) (B) (X = AB)
According to this table, you can easily deduce that the logical AND
function (logic product) corresponds to binary multiplication. 0 0 0
0 1 0
In the AND operation, the output is 1 if and only if all inputs are 1, and 1 0 0
it is 0 in all other cases. 1 1 1
The Logical AND Gate In other words, the AND gate is a logical circuit that activates its output (level
1) only when all its inputs are active (level 1). In all other cases, the output of the AND gate is inactive
(level 0), thus:

There are some AND gates with more than 2 inputs, the output gives the multiplications of the in-
puts.

To extend the AND expression to more than two input variables, simply use a new letter for each input
variable.
o The function of a 3-input AND gate, for example, can be expressed as X = ABC, where A, B, and
C are the input variables.
o The expression for a 4-input AND gate can be X = ABCD, and so on.

Example:An AND gate can be used is the device dedicated


to remind a passenger when he forgets to wear
a seatbelt in cars.
The three input variables are:
✓ A: Seatbelt sensor: Unbuckled → 1
Buckled → 0

✓ B: When the Weight switch is turned ON


(1), a timer is started that produces a HIGH
on input B for 30 seconds
✓ C: Weight sensor : Weight > 15 kg → 1
Weight < 15 kg → 0

The output is an audible alarm, it is energized for 30 seconds (the AND gate is HIGH=1) if there is a
passenger on the seat, and the seatbelt is unbuckled.

3
Chapter 3 Boolean Algebra

3.3. Disjunction (OR gate)

• Disjunction is a two bits or more operation, it pro- Input 1 (A) Input 2 (B) Output (X)
vides a true value if at least one bit is true(1). 0 0 0
• When we combine A and B using the logical OR 0 1 1
function, the result X satisfies the following ex-
1 0 1
pression:
1 1 1
X=A+B
• The output function is active if A OR B is active.
• The operation of this operator is defined by the following truth table.
• The logical OR is represented by the symbol of addition (logic addition): X = A + B
• The symbol used to represent a two-
input OR gate is shown:

The Logical OR Gate It is a logical circuit that activates its output (level 1) if either one or both of the
inputs are active (level 1). The output is inactive (level 0) only if both inputs are inactive (level 0).

Like the AND gates, it exists some OR gates with more than 2 inputs, the output gives the addition of
the inputs.

To extend the OR expression to more than two input variables, a new letter is used for each additional
variable.

o the function of a 3-input OR gate can be expressed as X = A + B + C.


o The expression for a 4-input OR gate can be written as X = A + B + C + D, and so on.

4
Chapter 3 Boolean Algebra

Example This system is designed for a single room in a home,


equipped with two windows and a door.

The sensors employed are magnetic switches that generate a HIGH=1


output when open and a LOW =0 output when closed.

✓ Door/ window open ➔ Sensor output 1

✓ Door/ window closed ➔ Sensor output 0

However, if one of the windows or the door is opened, the corre-


sponding magnetic switch produces a HIGH input to the OR gate, causing the gate's output to go HIGH.
This change in output triggers and latches an alarm circuit, activating an alarm to alert of a potential
intrusion.

Combined operators:

In digital electronics, four other types of logical gates are frequently encountered:

- NOT-OR gate (NOR),


- NOT-AND gate (NAND)
- Exclusive OR (XOR gate)
- Exclusive NOR (XNOR gate).

In reality, these gates correspond to combinations of the basic AND, OR, and NOT operations, and it is
relatively easy to describe them using the functions of Boolean algebra that you are already familiar
with.

The NAND gate (Not AND)


• The term NAND is a contraction of NOT-AND and implies an AND function with a com-
plemented (inverted) output.
• The standard logic symbol for a 2-input NAND gate and its equivalency to an AND gate
followed by an inverter are shown in the following Figure, where the symbol ≡ means
equivalent to. A rectangular outline symbol is shown in part (b).

• The NAND gate operates similarly to an AND gate followed by an inverter. The output expres-
sion of a NOT-AND gate is:
X= ̅̅̅̅̅
𝐴. 𝐵 = 𝐴 ↑ 𝐵.

5
Chapter 3 Boolean Algebra

• The truth table indicates that the output of a NOT-AND gate is precisely the inverse of that of
an AND gate for all input combinations.
Input 1 Input 2 Output (X)
(A) (B) ̅̅̅̅̅
𝑨. 𝑩 = 𝑨 ↑ 𝑩
In general, the output function of a n-input NOT-AND gate is
0 0 1
✓ Active (logic level 1) if only one of the inputs is inactive 0 1 1
(logic level 0).
1 0 1
✓ Inactive (logic level 0) only when all inputs are active (logic
level 1). 1 1 0

The NOR gate (Not OR)


• The term NOR is a contraction of NOT-OR and implies an OR function with an inverted (com-
plemented) output.
• The standard logic symbol for a 2-input NOR gate and its rectangular outline symbol are shown
in figure below:

You'll notice based in the figure that it is the symbol of an OR gate, except there is a small bubble
(circle) at the tip. This small circle represents an inversion operation.

• NOR gate operates similarly to an OR gate followed by an inverter. The output expression of a
NOR gate is:
X = ̅̅̅̅̅̅̅̅̅
𝐴 + 𝐵=𝐴↓𝐵

where X is the output, and A and B are the two inputs. The bar over the expression ̅̅̅̅̅̅̅̅̅̅
𝐴 + 𝐵 indicates
the logical NOT (inversion) operation applied to the OR of A and B.

• The truth table shown indicates that the output of a NOR Input 1 (A) Input 2 Output X=
(B) ̅̅̅̅̅̅̅̅
𝑨+𝑩 =𝑨↓ 𝑩
gate is precisely the inverse of that of an OR gate for all in-
put combinations. 0 0 1
0 1 0
1 0 0
In general, the output function of a n-input NOR gate is: 1 1 0

✓ Active (logic level 1) only when all inputs are inactive (logic level 0).
✓ Inactive (logic level 0) if any of the inputs is active (logic level 1).

The Exclusive OR (XOR gate)


• The output of an exclusive OR (XOR) gate is at a high logic level only when the two inputs are
at different logic levels. An XOR gate always has
only two inputs. This means that there are no
XOR gates with three or four inputs.

6
Chapter 3 Boolean Algebra

• These two inputs are combined in a way that


X= 𝐴. 𝐵̅ + 𝐴̅. 𝐵 Input 1 (A) Input 2 (B) Output (X)=
• This expression is abbreviated as: 𝑨⊕𝑩
0 0 0
𝑋 =𝐴⊕𝐵
Input
0 1 (A) Input
1 2 (B) Output
1
0 1 0 0 1 1
The four possible input combinations and the resulting 0 1 1 1 0 0
outputs for an XOR gate are given as follow: 1 0 0
1 1 1
For an exclusive-OR gate, output X is:
✓ High (1), when A and B are at oppo-
site levels.

The Exclusive OR (XNOR gate)


Like the XOR gate, an XNOR has only two inputs. The bubble on the output of the XNOR symbol indi-
cates that its output is opposite that of the XOR gate.

When the two input logic levels are opposite, the output of the exclusive-NOR gate is Low. The opera-
tion can be stated as follows (A and B are inputs, X is the output):

̅̅̅̅̅̅̅̅
X=𝐴 ⊕ 𝐵 = 𝐴. 𝐵 + 𝐴̅. 𝐵̅

For an exclusive-NOR gate, output X is:


✓ Low (0) when input A is Low (0) and input B is High
(1), or when A is High (1) and B is Low (0).
✓ High (1), when A and B are both High (1), or both
Low (0).
Summary:

7
Chapter 3 Boolean Algebra

4. Analysis of Boolean expressions

A logic system can be represented with its logic expression, truth table or logic diagram.

4.1. Expression from a logic diagram

•To write the expression of a logic diagram, we write sub-expressions for each logic gate
based on its inputs and operation.
• Combine the sub-expressions using the appropriate logical operators based on the in-
terconnections in the diagram. Use parentheses to clarify the order of operations.
Example: For the example logic diagram in the following Figure, the Boolean expression is deter-
mined in the following three steps:

1. The expression for the left-most AND gate with inputs C and D is CD.
2. The output of the left-most AND gate is one of the inputs to the OR gate and B is the
other input. Therefore, the expression for the OR gate is B + CD.
3. The output of the OR gate is one of the inputs to the right-most AND gate and A is the
other in-put. Therefore, the expression for this AND gate is A(B + CD), and the final
output expression for the entire circuit is given by:
F=A(B + CD)
4.2. Truth table and logic diagram from Expression

To fill the truth table of a logic expression:

1. Identify the variables and calculate the A B C D CD B+CD F=A(B + CD)


number of possible combinations. 0 0 0 0 0 0 0
2. Calculate the value of the outputs for all in- 0 0 0 1 0 0 0
put combinations.
0 0 1 0 0 0 0
3. You can divide the global expression and use
intermediate variables and columns. 0 0 1 1 1 1 0
0 1 0 0 0 1 0
Example: Draw the truth table then draw the logic 0 1 0 1 0 1 0
diagram of the following expression: 0 1 1 0 0 1 0
F=A(B + CD) 0 1 1 1 1 1 0
The expression has four variables A, B, C,D: the num- 1 0 0 0 0 0 0
ber of possible combinations is 24 = 16 1 0 0 1 0 0 0
1 0 1 0 0 0 0
In order to evaluate the expression F=A(B + CD):
1 0 1 1 1 1 1
• first find the values of the variables that make 1 1 0 0 0 1 1
the expression equal to 1, using the rules for 1 1 0 1 0 1 1
Boolean addition and multiplication. 1 1 1 0 0 1 1
• In this case, the expression equals F= 1 only if A 1 1 1 1 1 1 1
= 1 and B + CD = 1.

8
Chapter 3 Boolean Algebra

4.3. Expression from a truth table

• In a truth table, a logic output is considered True when it is in the HIGH state, represented by
the logical value 1, and False when if is in LOW state (0).
B A S
• In the following truth table, the expression S is at 1 for three input
combinations: 0 0 1
• 0 1 0
A = 0 and B = 0, OR A= 0 and B = 1, OR A= 1 and B = 1 1 0 1
So these combinations can be written with this expression: 1 1 1

̅ .B
S=A ̅ + ̅A . B + A. ̅B

To write expression of a logic function represented by its truth table, we use Canonical form: Sum Of
Products (SOP) or Product of Sum (POS)

5. Boolean expressions - Simplification of logic expressions

Simplifying logic expressions is essential in digital design and Boolean algebra for several reasons:
• Reduced Complexity: and make circuits easier to understand.
• Minimized Costs: by reducing the number of used logic gates.
• Improved Performance: The speed of a circuit is directly proportional to its simplicity—fewer
components result in quicker response times.
• Facilitates Troubleshooting: During the debugging and troubleshooting phases, simplified logic
expressions can make it easier to identify and rectify errors.

In this Chapter, we employ algebraic techniques and Karnaugh maps for simplifying logic expressions
The algebraic simplification method is based on the application of the basic laws, rules, and theo-
rems of Boolean algebra. Let’s introduce the set of this rules:
Rules Expression (OR) Demonstration Expression (AND) Demonstration
Negation/comple- 𝐴 + 𝐴̅ = 1 A=0→0+1=1 𝐴. 𝐴̅ = 0 A=0→0⋅1=0
ment A=1→1+0=1 A=1→1⋅0=0

Identity/neutral 𝐴+0=𝐴 A=0→0+0=0 𝐴. 1 = 𝐴 A=0→0⋅1=0


A=1→1+0=1 A=1→1⋅1=1

Idempotent 𝐴+𝐴=𝐴 A=0→0+0=0 𝐴. 𝐴 = 𝐴 A=0→0⋅0=0


A=1→1+1=1 A=1→1⋅1=1

Dominance 𝐴+1=1 A=0→0+1=1 𝐴. 0 = 0 A=0→0⋅0=0


A=1→1+1=1 A=1→1⋅0=0

Involution/double ne- 𝐴̿ = 𝐴 A=0 → 0̿=1̅=0


gation A=1 → 1̿=0̅=1

Xor complement 𝐴  1 = 𝐴̅
𝐴  𝐴̅ = 1

Before presenting the other laws of Boolean algebra, we would like to mention that in the previous
rules, the variable can correspond to an expression containing more than one variable.

9
Chapter 3 Boolean Algebra

For example, if we have two variables A and B: ̅̅̅̅) = 0.


𝐴𝐵. (𝐴𝐵

laws of Boolean algebra: The following laws pertain with more than one variable:

-Commutative law:
• With OR Expression: 𝐴 + 𝐵 = 𝐵 + 𝐴
• With AND Expression: 𝐴. 𝐵 = 𝐵. 𝐴
• With XOR Expression: 𝐴  𝐵 = 𝐵  𝐴

- Associative law:
• With OR Expression: 𝐴 + (𝐵 + 𝐶) = (𝐵 + 𝐴) + 𝐶
• With AND Expression: (𝐴. 𝐵). 𝐶 = 𝐴. (𝐵𝐶)
• With XOR Expression: 𝐴 ⊕ (𝐵 ⊕ 𝐶) = (𝐴 ⊕ 𝐵) ⊕ 𝐶

- Distributive law:
• With OR Expression: 𝐴 + (𝐵. 𝐶) = (𝐴 + 𝐵). (𝐴 + 𝐶)

(𝐴 + 𝐵). (𝐴 + 𝐶) = 𝐴𝐴 + 𝐴𝐶 + 𝐴𝐵 + 𝐵𝐶

= 𝐴 + 𝐴𝐶 + 𝐴𝐵 + 𝐵𝐶
= 𝐴(1 + 𝐶) + 𝐴𝐵 + 𝐵𝐶
= 𝐴(1 + 𝐵) + 𝐵𝐶
= 𝐴 + 𝐵𝐶

• With AND Expression: 𝐴. (𝐵 + 𝐶) = (𝐴𝐵) + (𝐴𝐶)


• With XOR Expression: 𝐴 . (𝐵  𝐶) = (𝐴 𝐵)  (𝐴 𝐶)
- Absorption:
𝐴 + (𝐴. 𝐵) = 𝐴 and 𝐴. (𝐴 + 𝐵) = 𝐴
Demonstration: Let’s demonstrate the first case 𝐴 + (𝐴. 𝐵) = 𝐴
𝐴 + (𝐴. 𝐵) = 𝐴. 1 + 𝐴𝐵 = 𝐴(1 + 𝐵)
= 𝐴. 1
=𝐴

Example: Demonstrate 𝐴. (𝐴 + 𝐵) = 𝐴 in the same way.

- Inclusion:
𝐴. 𝐵 + 𝐴. 𝐵̅ = 𝐴 (𝐴 + 𝐵). (𝐴 + 𝐵̅) = 𝐴
Demonstration: Let’s demonstrate the first case 𝐴. 𝐵 + 𝐴. 𝐵̅ = 𝐴

10
Chapter 3 Boolean Algebra

𝐴. 𝐵 + 𝐴. 𝐵̅ = 𝐴. (𝐵 + 𝐵̅)
knowing that 𝐵 + 𝐵̅ = 1
𝐴. 𝐵 + 𝐴. 𝐵̅ = 𝐴. (1) = 𝐴
- Relief theory
𝐴 + (𝐴̅. 𝐵) = 𝐴 + 𝐵 𝐴. (𝐴̅ + 𝐵) = 𝐴. 𝐵
Demonstration: Let’s demonstrate 𝐴 + (𝐴̅. 𝐵) = 𝐴 + 𝐵
𝐴 + (𝐴̅. 𝐵) = (𝐴 + 𝐴̅)(𝐴 + 𝐵) f
𝐴 + (𝐴̅. 𝐵) = 1(𝐴 + 𝐵) (𝐴 + 𝐴̅) = 1
̅
𝐴 + (𝐴. 𝐵) = 𝐴 + 𝐵

Example: in the same way prove 𝐴. (𝐴̅ + 𝐵) = 𝐴. 𝐵

- De-Morgan theory
The De Morgan theorems prove to be highly useful for simplifying expressions involving sums or
products of complemented variables. Here are these two theorems:
̅̅̅̅̅̅̅̅
𝐴 + 𝐵 = 𝐴̅. 𝐵̅ ̅̅̅̅̅
𝐴. 𝐵 = 𝐴̅ + 𝐵̅

Although these theorems were formulated for single variables A and B, they remain true for cases
where X and Y are expressions involving multiple variables.

Example : As an illustration, let's apply these theorems to the following expression:

̅̅̅̅̅̅̅̅̅̅
𝐴𝐵̅ + 𝐶 = ̅̅̅̅̅̅̅
( 𝐴. 𝐵̅). 𝐶̅

The found result can be further simplified ̅̅̅̅̅̅ ̅̅̅ + 𝐵̿). 𝐶̅


(𝐴. 𝐵̅). 𝐶̅ = (𝐴
As 𝐵 = 𝐵̿ , the final result is ̅̅̅
(𝐴 + 𝐵̿). 𝐶̅ = ̅̅̅̅
𝐴𝐶 + 𝐵𝐶̅

Example: Apply DeMorgan’s theorems and Boolean algebra to the specific expression

11
Chapter 3 Boolean Algebra

̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
̅̅̅̅̅̅̅̅̅̅ ̅̅̅̅̅̅̅̅̅̅
𝐴 + 𝐵𝐶̅ + 𝐷(𝐸 + 𝐹̅ )
Identify the terms to which you can apply DeMorgan’s theorems, and think of each term as a single
variable.
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
̅̅̅̅̅̅̅̅̅̅ ̅̅̅̅̅̅̅̅̅̅̅̅̅̅ ̅̅̅̅̅̅̅̅̅̅̅̅
𝐴 + 𝐵𝐶̅ + 𝐷(𝐸 + 𝐹̅ ) = ̅̅̅̅̅̅̅̅̅̅̅
̅̅̅̅̅̅̅̅̅̅ ( 𝐴 + 𝐵𝐶 ). 𝐷(𝐸 ̅̅̅̅̅̅̅̅̅̅
+ 𝐹̅ )
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
̅̅̅̅̅̅̅̅̅̅ ̅̅̅̅̅̅̅̅̅̅ ̅ + ̿̿̿̿̿̿̿̿̿̿
𝐴 + 𝐵𝐶̅ + 𝐷(𝐸 + 𝐹̅ ) = (𝐴. 𝐵𝐶̅ ). (𝐷 (𝐸 + 𝐹̅ ))
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
̅̅̅̅̅̅̅̅̅̅ ̅̅̅̅̅̅̅̅̅̅
𝐴 + 𝐵𝐶̅ + 𝐷(𝐸 + 𝐹̅ ) = (𝐴. 𝐵𝐶̅ ). (𝐷 ̅ + 𝐸 + 𝐹̅ )

5.1. Logic simplification using Boolean Algebra

A simplified Boolean expression uses the fewest gates possible to implement a given expression us-
ing the basic laws, rules, and theorems of Boolean algebra.
Example: Using Boolean algebra techniques, simplify this expression:
𝐴𝐵 + 𝐴(𝐵 + 𝐶) + 𝐵(𝐵 + 𝐶)
Step 1: Apply the distributive law to the second and third terms in the expression, as follows:

𝐴𝐵 + 𝐴𝐵 + 𝐴𝐶 + 𝐵𝐵 + 𝐵𝐶

Step 2: Apply Idempotent rule (BB = B) to the fourth term.

𝐴𝐵 + 𝐴𝐵 + 𝐴𝐶 + 𝐵 + 𝐵𝐶

Step 3: Apply rule Idempotent (𝐴𝐵 + 𝐴𝐵 = 𝐴𝐵) to the first two terms.

𝐴𝐵 + 𝐴𝐶 + 𝐵 + 𝐵𝐶

Step 4: Apply Absorption rule (𝐵 + 𝐵𝐶 = 𝐵) to the last two terms.

𝐴𝐵 + 𝐴𝐶 + 𝐵

Step 5: Apply rule Absorption (𝐴𝐵 + 𝐵 = 𝐵) to the first and third terms.

𝐵 + 𝐴𝐶

At this point the expression is simplified as much as possible. Once you gain experience in applying
Boolean algebra, you can often combine many individual steps.

Example: Using Boolean algebra techniques, simplify this expression:


𝐴𝐵̅𝐶𝐷 + 𝐴𝐵𝐶̅ 𝐷
̅ + 𝐴𝐵𝐶̅ 𝐷 + 𝐴𝐵𝐶𝐷
̅ + 𝐴𝐵𝐶𝐷

12
Chapter 3 Boolean Algebra

Step 1: Apply the associative law to the 2 ,3,4 and 5 terms in the expression, as follows:

𝐴𝐵̅𝐶𝐷 + 𝐴𝐵(𝐶̅ 𝐷
̅ + 𝐶̅ 𝐷 + 𝐶𝐷
̅ + 𝐶𝐷)

Step 2: Apply the commutative law and complement rule to the 2nd term in the expression, as fol-
lows:

𝐴𝐵̅𝐶𝐷 + 𝐴𝐵(𝐶̅ (𝐷
̅ + 𝐷) + 𝐶(𝐷
̅ + 𝐷))

Step 3: Apply the associative and Relief ( 𝐵̅𝐶𝐷 + 𝐵 = 𝐵 + 𝐶𝐷 ) laws in the expression, as follows:

𝐴𝐵̅𝐶𝐷 + 𝐴𝐵𝐶̅ 𝐷
̅ + 𝐴𝐵𝐶̅ 𝐷 + 𝐴𝐵𝐶𝐷
̅ + 𝐴𝐵𝐶𝐷
= 𝐴(𝐶𝐷 + 𝐵)

So, we have moved from circuits that contains several AND and OR gates connected with inverters to
just 2 AND gates and 1 OR.

6. Standard Forms of Boolean Expressions

The truth table lists the combination of inputs and their corresponding outputs. The function repre-
sented by the truth table is True (1) for some combinations, and false (0) for the others

When extracting a logic expression from a truth table, we have the flexibility to derive the original
function (𝐹) by considering the rows with ones, or its complemented form ( 𝐹̅ ) by focusing on the rows
with zeros.

All Boolean expressions, regardless of their form, can be converted into either of two forms: the sum-
of-products form or the product-of-sums form.

Using Ones Using Zeros


𝑭 𝐅̅
Sum Of Product (SOP) form Product Of Sum (POS) form

Standardization (canonical form) makes the evaluation, simplification, and implementation of Boolean
expressions much more systematic and easier.

6.1. Sum-Of-Products (SOP) (nonstandard form)

A product term was defined 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:

𝐴𝐵 + 𝐴𝐵𝐶

𝐴𝐵𝐶 + 𝐶𝐷𝐸 + 𝐵𝐶𝐷

𝐴𝐵 + 𝐴𝐵𝐶 + 𝐴𝐶

13
Chapter 3 Boolean Algebra

Also, an SOP expression can contain a single-variable term, as in A + ABC + BCD.

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 𝑨𝑩𝑪
̅𝑪 ̅̅̅̅̅̅

Implementing an SOP expression simply requires ORing the outputs of two or more AND gates. A prod-
uct term is produced by an AND operation, and the sum (addition) of two or more product terms is
produced by an OR operation.

Conversion of a General Expression to SOP Form 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:

- 𝐴(𝐵 + 𝐶𝐷) = 𝐴𝐵 + 𝐴𝐶𝐷


- 𝐴𝐵 + 𝐵(𝐶𝐷 + 𝐸𝐹) = 𝐴𝐵 + 𝐵𝐶𝐷 + 𝐵𝐸𝐹
- (𝐴 + 𝐵)(𝐵 + 𝐶 + 𝐷) = 𝐴𝐵 + 𝐴𝐶 + 𝐴𝐷 + 𝐵𝐵 + 𝐵𝐶 + 𝐵𝐷

6.1.1. The Standard SOP Form (1st canonical form)

So far, we have seen SOP expressions in which some of the product terms do not contain all of the
variables of the expression.

For example, the expression 𝑨 ̅ 𝑩𝑪


̅ + 𝑨𝑩 ̅𝑫 + 𝑨 ̅ 𝑩𝑪̅ 𝑫 has made up of the variables A, B, C, and D.
However, notice that the complete set of variables is not represented in the first two terms of the
̅ is missing from the first term and 𝐶 or ̅𝐶 is missing from the second term.
expression; that is, 𝐷 or 𝐷

A standard SOP expression is one in which all the variables appear in each product term in the ex-
pression.

Standard Sum of products or sum of minterms = disjunctive canonical form = first canonical form =
FC1

For example: 𝐴𝐵̅𝐶𝐷 + 𝐴̅𝐵̅𝐶𝐷


̅ + 𝐴𝐵𝐶̅ 𝐷
̅ is a standard (canonical) SOP expression.

✓ Standard Sum of products expression is important in constructing truth tables, and in the
Karnaugh map simplification method.
✓ The logical product of these variables is known as Minterm
✓ In the minterm or in a product term in general, the normal variable is represented by 1 and
the complemented variable is represented by 0.

14
Chapter 3 Boolean Algebra

Example: n = 3 (A,B,C) then: A B C Minterm


o 𝐴̅𝐵̅𝐶̅ , 𝐴. 𝐵̅. 𝐶̅ , 𝐴̅. 𝐵. 𝐶̅ , 𝐴̅. 𝐵̅. 𝐶, 𝐴̅. 𝐵. 𝐶, 𝐴. 𝐵. 𝐶̅ . 𝐴. 𝐵̅. 𝐶, 𝐴. 𝐵. 𝐶 are 0 0 0 ̅𝐴. 𝐵̅. 𝐶̅ m0
minterms. 0 0 1 ̅𝐴. 𝐵̅. 𝐶 m1
o 𝐴̅. 𝐵̅, 𝐴̅. 𝐶, 𝐵. 𝐶̅ , 𝐵. 𝐶, 𝐴. 𝐵̅ are not minterms , as they don’t contain all 0 1 0 ̅𝐴. 𝐵. 𝐶̅ m2
the Boolean variables. 0 1 1 ̅𝐴. 𝐵. 𝐶 m3
1 0 0 𝐴. 𝐵.̅ 𝐶̅ m 4
1 0 1 𝐴. 𝐵.̅𝐶 m5
With n variable, we can form 2n different minterms
1 1 0 𝐴. 𝐵. 𝐶̅ m6
1 1 1 𝐴. 𝐵. 𝐶 m7

The first canonical form can be obtained from the truth table directly by considering those input com-
binations that produce a logic ‘1’ at the output.

̅,
Example: Let’s take an example about that, So, assume the function 𝑭(𝑨, 𝑩, 𝑪) = 𝑨. 𝑩 + 𝑪

A B C A.B ̅
𝑪 ̅ minterms
𝑭(𝑨, 𝑩, 𝑪) = 𝑨. 𝑩 + 𝑪
0 0 0 0 1 1 ̅. 𝑩
𝑨 ̅
̅. 𝑪
0 0 1 0 0 0
0 1 0 0 1 1 ̅ . 𝑩. 𝑪
𝑨 ̅
0 1 1 0 0 0
1 0 0 0 1 1 𝑨. 𝑩 ̅
̅. 𝑪
1 0 1 0 0 0
1 1 0 0 1 1 𝑨. 𝑩. 𝑪̅
1 1 1 1 0 1 𝑨. 𝑩. 𝑪

To obtain the logical expression from the truth table in the first canonical form FC 1 (we add the sum
of the Minterms for which the output is 1.

The FC1 (F) = 𝐴̅. 𝐵̅. 𝐶̅ + 𝐴̅. 𝐵. 𝐶̅ +𝐴. 𝐵̅. 𝐶̅ + 𝐴. 𝐵. 𝐶̅ +𝐴. 𝐵. 𝐶

6.1.2. decimal form of the canonical form (FD 1) : decimal form of the disjunctive (first) ca-
nonical form FD 1 represented by the sum of decimal numbers equivalent to the
Minterms in which the output is equal to 1.
The variable is represented by 1 and the complemented variable is represented by 0.

minterm 𝐴̅. 𝐵. 𝐶 is represented by (011)2 = (3)10

𝐹(𝐴, 𝐵, 𝐶) = 𝐴̅. 𝐵̅. 𝐶̅ + 𝐴̅. 𝐵. 𝐶̅ + 𝐴. 𝐵̅. 𝐶̅ + 𝐴. 𝐵. 𝐶̅ + 𝐴. 𝐵. 𝐶


000 010 100 110 111
FD1 (F) = ∑ 0,2,4,6,7
6.1.3. From non-standard form to FC1:

Any nonstandard SOP expression (referred to simply as SOP) can be converted to the standard form
using Boolean algebra. Each product term in an SOP expression that does not contain all the variables

15
Chapter 3 Boolean Algebra

in the expression 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
̅ = 𝟏): a variable added to its complement equals 1.
using Boolean algebra rule (𝑨 + 𝑨
Step 1: Multiply each nonstandard product term by a term made up of missing variable and its com-
plement. 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.
𝐹 = 𝐴𝐵 + 𝐶

The domain of this SOP expression is A, B, C. Take one term at a time. The first term, AB, is missing
variable 𝐶 𝑜𝑟 𝐶̅ , so multiply the first term 𝐶 + 𝐶̅ as follows:

𝐴𝐵𝐶 = 𝐴𝐵(𝐶 + 𝐶̅ ) = 𝐴𝐵𝐶 + 𝐴𝐵𝐶̅

In this case, two standard product terms are the result.

The second term, C, is missing variables 𝐴 𝑜𝑟 ̅𝐴 and 𝐵 𝑜𝑟 ̅


𝐵 , so first multiply the second term by
(𝐴 + ̅𝐴) as follows:

𝐶 = 𝐶(𝐴 + ̅𝐴) = 𝐴𝐶 + ̅𝐴𝐶

The two resulting terms are missing variable D or, so multiply both terms by 𝐵 + 𝐵̅ as follows:

𝐴𝐶 + ̅𝐴𝐶 = 𝐴𝐶 (𝐵 + 𝐵̅) + ̅𝐴𝐶(𝐵 + 𝐵̅) = 𝐴𝐶𝐵 + 𝐴𝐶𝐵̅ + ̅𝐴𝐶𝐵̅ + ̅𝐴𝐶𝐵

The complete standard SOP form of the original expression is as follows:

𝐹 = 𝐴𝐵 + 𝐶 = 𝐴𝐵𝐶 + 𝐴𝐵𝐶̅ + 𝐴𝐶𝐵̅ + ̅𝐴𝐶𝐵̅ + ̅𝐴𝐶𝐵

6.2. The Product-of-Sums (POS) Form (nonstandard form)

A sum term was defined as a term consisting of the sum (Boolean addition) of literals (variables or their
complements). When two or more sum terms are multiplied, the resulting expression is a product-of-
sums (POS). Some examples are:

(𝐴 + 𝐵̅ )(𝐴 + 𝐵 + 𝐶̅ )

(𝐴̅ + 𝐵 + 𝐶̅ )(𝐶 + 𝐷
̅ + ̅𝐸 )(𝐵̅ + 𝐶 + 𝐷)

Also, an POS expression can contain a single-variable term, as in 𝐴 (𝐴̅ + 𝐵 + 𝐶) ( 𝐵̅ + 𝐶 + 𝐷


̅ ).

16
Chapter 3 Boolean Algebra

In an POS 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 POS expression can have the term:
̅+𝑩
𝑨 ̅ +𝑪̅ but not ̅̅̅̅̅̅̅̅̅̅̅̅̅
𝑨+𝑩+𝑪
Implementing a POS expression simply requires ANDing the outputs of two or more OR gates. A sum
term is produced by an OR operation, and the product of two or more sum terms is produced by an
AND operation.

6.2.1. The Standard POS Form (2nd canonical form)

A standard POS expression is one in which all the variables in the domain appear in each sum term
in the expression.

𝐷 )(𝐴̅ + 𝐵 + 𝐶̅ + 𝐷)(𝐴 + 𝐵 + 𝐶 + 𝐷)
For example, (𝐴 + 𝐵̅ + 𝐶 + ̅

Standard Product of Sums = Product of maxterms = Conjunctive canonical form = Second canonical
form = FC2
The Maxterms of n variables is the logical sum of all the variables in the domain whether in their nor-
mal or complemented forms. In the maxterm, of in a sum term in general, the normal variable is
represented by 0 and the complemented variable is represented by 1.

A B C Maxterm
Example: n = 3 (A, B, C) then: 0 0 0 𝐴+𝐵+𝐶 M0
0 0 1 𝐴 + 𝐵 + 𝐶̅ M1
𝐴̅ + 𝐵̅ + 𝐶̅ , 𝐴 + 𝐵̅ + 𝐶̅ , ̅𝐴 + 𝐵 + 𝐶̅ , ̅𝐴 + 𝐵̅ + 𝐶, 𝐴̅ + 𝐵 +
0 1 0 𝐴 + 𝐵̅ + 𝐶 M2
𝐶, 𝐴 + 𝐵 + 𝐶̅ , 𝐴 + 𝐵̅ + 𝐶, 𝐴 + 𝐵 + 𝐶 are maxterms
0 1 1 𝐴 + 𝐵̅ + 𝐶̅ M3
𝐴̅ + 𝐵̅, 𝐴̅ + 𝐶, 𝐵 + 𝐶̅ , 𝐵 + 𝐶, 𝐴 + 𝐵̅ are not maxterms; 1 0 0 𝐴̅ + 𝐵 + 𝐶 M4
1 0 1 𝐴̅ + 𝐵 + 𝐶̅ M5
With n variable, we can form 2n different maxterms 1 1 0 𝐴̅ + 𝐵̅ + 𝐶 M6
1 1 1 𝐴̅ + 𝐵̅ + 𝐶̅ M7

The second canonical form can be obtained from the truth table directly by considering those input
combinations that produce a logic ‘0’ at the output.

To obtain the logical expression under FC 2 (conjunctive), we have two methods:

1. We directly obtain the maxterms for which the output in the truth table is 0.
2. ̅ (for which the output is 0) by adding the
We first obtain the FC 1 of the function 𝑭
Minterms, then we calculate 𝐹̿ by applying the DE Morgan theorem.
Let the same previous example: 𝐹(𝐴, 𝐵, 𝐶) = 𝐴. 𝐵 + 𝐶̅ .

A B C A.B ̅
𝑪 ̅
𝑭(𝑨, 𝑩, 𝑪) = 𝑨. 𝑩 + 𝑪 Maxterms for output 0 ̅)
Minterms (𝑭
0 0 0 0 1 1
0 0 1 0 0 0 ̅
𝑨+𝑩+𝑪 𝐴̅. 𝐵̅. 𝐶
0 1 0 0 1 1
0 1 1 0 0 0 𝑨+𝑩 ̅
̅ +𝑪 𝐴̅. 𝐵. 𝐶
1 0 0 0 1 1

17
Chapter 3 Boolean Algebra

1 0 1 0 0 0 𝑨̅+𝑩+𝑪 ̅ 𝐴. 𝐵̅. 𝐶
1 1 0 0 1 1
1 1 1 1 0 1
Using the first method, we directly get the FC2 by multiplying the maxterms for which the output is
0:
FC2 (F) = (𝑨 + 𝑩 + 𝑪̅ ).(𝑨 + 𝑩
̅ +𝑪̅ ).(𝑨
̅+𝑩+𝑪 ̅)

Using the second method, we first get 𝐹̅ which is the sum of minterms for which the output is 0, then
complementing it using de-morgan’s:
𝐹̅ = 𝐴̅. 𝐵̅ . 𝐶 + 𝐴̅. 𝐵. 𝐶+ 𝐴. 𝐵̅. 𝐶
𝐹 = 𝐹̿ =𝐴 ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
̅. 𝐵̅ . 𝐶 + 𝐴̅. 𝐵. 𝐶 + 𝐴. 𝐵̅. 𝐶
= ̅̅̅̅̅̅̅̅
𝐴̅. 𝐵̅. 𝐶 . ̅̅̅̅̅̅̅̅
𝐴̅. 𝐵. 𝐶 . ̅̅̅̅̅̅̅̅
𝐴. 𝐵̅. 𝐶
= (𝐴 + 𝐵 + 𝐶̅ ).( 𝐴 + 𝐵̅ + 𝐶̅ ).( 𝐴̅ + 𝐵 + 𝐶̅ )
= FC2 (F)
nd
6.2.2. The Standard POS Form (2 canonical form)

The decimal form of the conjunctive canonical form FD 2 produces decimal numbers equivalent to
the Maxterms of the function for which the output is equal to 0. The variable is represented by 0 and
the complemented variable is represented by 1.
- The maxterm 𝐴̅ + 𝐵 + 𝐶 is represented by (100)2 = (4)10

taking the same example from earlier:


F(A, B, C) = (𝐴 + 𝐵 + 𝐶̅ ).( 𝐴 + 𝐵̅ + 𝐶̅ ).( 𝐴̅ + 𝐵 + 𝐶̅ )
001 011 101
FD2 (F) = ∏ 1,3,5

6.2.3. From non-standard form to FC2:

As stated in the following steps, a nonstandard POS expression is converted into standard form using
Boolean algebra rule (𝐴 . 𝐴̅ = 0) : 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: A + BC = (A + B)(A + C)
Step 3: Repeat Step 1 until all resulting sum terms contain all variables in the domain in either comple-
mented or uncomplemented form.
Example: Given the function 𝐹(𝐴, 𝐵, 𝐶) = (𝐴̅ + 𝐵 + 𝐶̅ ). (𝐴 + 𝐵). 𝐵̅ convert the standard POS.

F=(𝐴̅ + 𝐵 + 𝐶̅ ). (𝐴 + 𝐵). 𝐵̅
=(𝐴̅ + 𝐵 + 𝐶̅ ). (𝐴 + 𝐵 + (𝐶. 𝐶̅ )). (𝐵̅ + (𝐴. 𝐴̅) + (𝐶. 𝐶̅ ) )
=(𝐴̅ + 𝐵 + 𝐶̅ ). ((𝐴 + 𝐵 + 𝐶). (𝐴 + 𝐵 + 𝐶̅ )). ((𝐵̅ + 𝐴). (𝐵̅ + 𝐴̅)) + (𝐶. 𝐶̅ ) )

18
Chapter 3 Boolean Algebra

𝐹𝐶2 = (𝐴̅ + 𝐵 + 𝐶̅ ). ((𝐴 + 𝐵 + 𝐶). (𝐴 + 𝐵 + 𝐶̅ )). ((𝐵̅ + 𝐴 + 𝐶). (𝐵̅ + 𝐴 + 𝐶̅ ). (𝐵̅ + 𝐴̅ + 𝐶). (𝐵̅ + 𝐴̅
+ 𝐶̅ ))
7. General examples that combines everything:
Example 1: Assume the following function F(A, B, C) represented by the truth table below: Write the
FC1, FC2, FD1, FD2
Solution:
A B C F minterms maxterms

0 0 0 0 0 𝐴+𝐵+𝐶
1 0 0 1 0 𝐴 + 𝐵 + 𝐶̅
2 0 1 0 1 ̅𝐴. 𝐵. 𝐶̅
3 0 1 1 0 𝐴 + 𝐵̅ + 𝐶̅
4 1 0 0 1 ̅ 𝐶̅
𝐴. 𝐵.
5 1 0 1 0 𝐴̅ + 𝐵 + 𝐶̅
6 1 1 0 0 𝐴̅ + 𝐵̅ + 𝐶
7 1 1 1 1 𝐴. 𝐵. 𝐶

✓ To write the FC1, we first write the minterms from the truth table whenever the output is 1.
- They are all presented in the table below. The FC1 is the sum of these minterms.
- The minterms correspond to binary representations of (010, 100, 111).
𝑭𝑪𝟏(𝑭) = ̅ ̅ + 𝑨. 𝑩.
𝑨. 𝑩. 𝑪 ̅𝑪 ̅ + 𝑨. 𝑩. 𝑪
- The FD1 is the decimal representation of the minterms:
𝑭𝑫𝟏 (𝑭) = ∑ (𝟐, 𝟒, 𝟕)

✓ To represent the FC2 by multiplying the maxterms from the truth table whenever the output
is 0.
- The maxterms are the binary representation of (000, 001, 011, 101, 110).
- Remember that in maxterms, the 0 correspond the variable and 1 corresponds to the comple-
mented variable.
̅ ). (𝑨 + 𝑩
𝑭𝑪𝟐 (𝑭) = ( 𝑨 + 𝑩 + 𝑪). (𝑨 + 𝑩 + 𝑪 ̅ ). (𝑨
̅ +𝑪 ̅+𝑩+𝑪
̅ ). (𝑨
̅+𝑩
̅ + 𝑪)

- The FD2 is the decimal representation of the maxterms:

𝑭𝑫𝟐 = ∏(𝟎, 𝟏, 𝟑, 𝟓, 𝟔)

Example 2: given the function F(A, B, C) = ̅𝐴. 𝐵. 𝐶 + 𝐴. 𝐶 + 𝐴. 𝐵̅. 𝐶 + 𝐴̅. 𝐵̅ . Write the canonical forms
of the function.

Solution:

19
Chapter 3 Boolean Algebra

It can be noticed that function is given in a form that is similar to SOP, where the first term is a
minterm, and the third term is a minterm as well. The second and last product terms has to be put in
a minterm form.
1. So: we multiply the second term ̅𝐴. 𝐶 by the missing the variable and its complement (𝐵 +
𝐵̅) to get ̅𝐴. 𝐵. 𝐶 + ̅𝐴. 𝐵̅. 𝐶
2. We also multiply the last term 𝐴̅. 𝐵̅ by (𝐶 + 𝐶̅ ) to get 𝐴̅. 𝐵̅. 𝐶 +𝐴̅. 𝐵̅. 𝐶̅

The function as sum of minterms is: ̅𝐴. 𝐵. 𝐶 + 𝐴. 𝐵. 𝐶 + 𝐴. 𝐵̅. 𝐶+ 𝐴. 𝐵̅. 𝐶 + 𝐴̅. 𝐵̅. 𝐶 +𝐴̅. 𝐵̅. 𝐶̅

And this is our FC1 (standard sum of products). Notice that the third and fourth terms are repeated,
so we remove one of them to get :

𝑭𝑪𝟏(𝑭) = ̅ ̅. 𝑩
̅. 𝑪 + 𝑨
𝑨. 𝑩. 𝑪 + 𝑨. 𝑩. 𝑪 + 𝑨. 𝑩 ̅. 𝑩
̅. 𝑪 + 𝑨 ̅
̅. 𝑪

These minterms correspond to the binary representation of : (011, 111, 101, 001, 000 )

The FD1 (F) = ∑ (0,1,3,5,7), And it is the FD2 = ∏(2, 4, 6)


So the FC2 is maxterms that are represented in binary by: (010, 100, 110)
̅ + 𝑩 + 𝑪). (𝑨
̅ + 𝑪) . (𝑨
𝑭𝑪𝟐 = (𝑨 + 𝑩 ̅+𝑩
̅ + 𝑪)

So in this example, we found FC1 and FC2 without using a truth table.
Example 3: given the function 𝐹(𝐴, 𝐵, 𝐶) = (𝐵 + 𝐶). 𝐴. ( (𝐵̅ + 𝐶̅ )) find the canonical forms of this
function.
Solution: we notice that this function is in the form of product of sums. However, they are not in the
standard form.
1. The first term(𝐵 + 𝐶) is converted to a maxterm by adding (𝐴. 𝐴̅) to get: (𝐴 + 𝐵 + 𝐶). (𝐴̅ +
𝐵 + 𝐶)
̅̅̅̅ then
2. The second term A is converted to a maxterm by adding (𝐵. 𝐵̅ ) to get (𝐴 + 𝐵). (𝐴 + 𝐵)
by adding (𝐶. 𝐶̅ ) to get (𝐴 + 𝐵 + 𝐶). (𝐴 + 𝐵̅ + C). (𝐴 + 𝐵 + 𝐶̅ ). (𝐴 + 𝐵̅ + C̅)
3. The last term (𝐵̅ + 𝐶̅ ) is converted to a maxterm by adding (𝐴. 𝐴̅)to get (𝐴 + 𝐵̅ + 𝐶̅ ). (𝐴̅ +
𝐵̅ + 𝐶̅ )
̅ + 𝑩 + 𝑪). (𝑨 + 𝑩
𝑭𝑪𝟐 (𝑭) =∶ (𝑨 + 𝑩 + 𝑪). (𝑨 ̅ ). (𝑨 + 𝑩
̅ + 𝑪). (𝑨 + 𝑩 + 𝑪 ̅ ). (𝑨
̅ +𝑪 ̅+𝑩 ̅)
̅ +𝑪
It corresponds to the binary representation of (000, 100,010, 001, 011, 111) after removing the re-
peated terms
So, the 𝑭𝑫𝟐 (𝑭) = ∏(𝟎, 𝟏, 𝟐, 𝟑, 𝟒, 𝟕)
And the FD1(F) = ∑ (5,6) which are the terms that didn’t appear in the FC2.
̅
̅ . 𝑪 + 𝑨. 𝑩. 𝑪
𝑭𝑪𝟏(𝑭) = 𝑨. 𝑩
Remember that:
✓ All truth table entries that are not minterms, they are for sure maxterms

20
Chapter 3 Boolean Algebra

✓ We can determine the FC2 from the FC1 by determining which truth table entries are not there
and writing their corresponding maxterms and vice versa.
Standard Forms of Boolean Expressions

7. Simplification of logic function

As we said before that there are two different ways to simplify logic circuits. The first way is based on
the application of the theorems of Boolean algebra which is thoroughly discussed in previous section.
In the following section, we will explore the other method (Karnaugh maps), which, on the contrary,
follows a systematic approach.

8.1. Graphic simplification using Karnaugh method:

• A Karnaugh map provides a systematic method for simplifying Boolean expressions.


• A Kmap 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.

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 two variables, the number of cells is 22 = 4.

For three variables, the number of cells is 23 = 8.

For four variables, the number of cells is 24 = 16.

8.2. Construction of a Karnaugh Map

The Karnaugh table, just like the truth table, is a tool that shows how input values connect to the
desired output.
A B
0 0
0 1 A B C B 0 1
A
B 00 01 11 10
A A
0 1 0 0 0 00 000 001
0 00 01 0 000 001 011 010
B 0 0 1
1 0
1 10 11 0 1 0 01 010 011 1 100 101 111 110
1 1
0 1 1
1 0 0 11 110 111
1 0 1
1 1 0 10 100 101
1 1 1

21
Chapter 3 Boolean Algebra

A B C D
0 0 0 0 CD 00 01 11 10
AB
0 0 0 1
0 0 1 0 00 0 1 3 2

0 0 1 1
01 4 5 7 6
0 1 0 0
0 1 0 1 11 12 13 15 14
0 1 1 0
0 1 1 1 10 8 9 11 10
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1

The Karnaugh table is designed to ensure that only one variable changes between two neighboring
cells follows the gray code count. This will help in simplification later since there is one common vari-
able between each cell. and it can be taken out as a common factor and the remaining variable is
simplified since it is left along with its complement.

Adjacency boxes (cells ):Two boxes are said to be adjacent in the Karnaugh table if they correspond to
combinations differing by only one bit. Adjacency is defined by a single-variable change.
Examples of cells adjacent: the yellow boxes with red marked are adjacent to the green box that con-
tains the letter. The boxes in orange are not adjacent since there a two-variable change.
Cells are not adjacent to cells that diagonally touch any of their corners.
Cell adjacency in a 2,3,4 variables Karnaugh table:
Cell adjacency in a 2-variable Karnaugh table:

B 0 𝟏 B 0 𝟏 B 0 𝟏 B 0 𝟏
A A A
A
0 X 0 X 0 0

1 1 1 X 1 X

Cell adjacency in a 3-variable Karnaugh table:

22
Chapter 3 Boolean Algebra

C 0 1 AB 00 01 11 10
AB C
00 X 0 X
01 1
11
10

C 0 1 AB 00 01 11 10
AB C
00 0 X
01 X 1
11
10

C 0 1 AB 00 01 11 10
AB C
00 0
01 1 X
11
10 X

Cell adjacency in a 4-variable Karnaugh table:


00 01 11 10 00 01 11 10
00 00 X
01 X 01
11 11
10 10

00 01 11 10
00
01
11 X
10

Cells in the outer left column are adjacent to corresponding cells in the outer right column. The map
can be visualized as wrapping around from top to bottom or from left to right.

23
Chapter 3 Boolean Algebra

8.3. Mapping a Standard SOP Expression


✓ For an SOP expression in standard form (FC1), 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 𝐴𝐵̅𝐶, a 1 goes in the 101 cell on a 3-variable map.
1. 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.
Here is some examples on how to map minterms
For 3 inputs kmap: the 1st canonical form of 𝑋 = 𝐴̅𝐵̅𝐶 + 𝐴̅𝐵𝐶̅ + 𝐴̅𝐵𝐶 + 𝐴𝐵𝐶̅ + 𝐴𝐵𝐶

A B C 𝑿
00 01 11 10 0 0 0 0 1
1 0 0 1 0
0 1 1 1 2 0 1 0 1
0 1 3 2 3 0 1 1 1
1 1 1 4 1 0 0 0
4 5 7 6 5 1 0 1 0
6 1 1 0 1
7 1 1 1 1

For 4 inputs kmap: the 1st canonical form of 𝑋 = 𝐴𝐵̅𝐶𝐷 + 𝐴𝐵𝐶̅ 𝐷


̅ + 𝐴𝐵𝐶̅ 𝐷 + 𝐴𝐵𝐶𝐷
̅ + 𝐴𝐵𝐶𝐷

24
Chapter 3 Boolean Algebra
A B C D 𝑿
0 0 0 0 0 0
1 0 0 0 1 0
2 0 0 1 0 0
00 01 11 10
3 0 0 1 1 0
4 0 1 0 0 0
00
5 0 1 0 1 0
0 1 3 2
6 0 1 1 0 0 01
7 0 1 1 1 0 4 5 7 6
8 1 0 0 0 0 11 1 1 1 1
9 1 0 0 1 0 12 13 15 14
10 1 0 1 0 0 10 1
11 1 0 1 1 1 8 9 11 10
12 1 1 0 0 1
13 1 1 0 1 1
14 1 1 1 0 1
15 1 1 1 1 1

8.4. Mapping a Nonstandard SOP Expression


Recall that a nonstandard product term has one or more missing variables. For example, assume that
one of the product terms in a certain 3-variable SOP expression is A𝐵̅.
This term can be expanded numerically to standard form as follows:
• First, write the binary value of the two variables and attach a 0 for the missing variable C: 100.
• Next, write the binary value of the two variables and attach a 1 for the missing variable C: 101.
• The two resulting binary numbers are the values of the standard SOP terms A𝐵̅𝐶̅ and ABC.

Example: Map the following SOP expression on a Karnaugh map: A + AB + ABC.


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:
𝐴 + 𝐴𝐵̅ + 𝐴̅𝐵𝐶
For the first term A:
• First, write the binary value of the A and attach a 0 for the missing variable B and C: 100. 𝐴𝐵̅𝐶̅
• Next , write the binary value of the A and attach a 0 for the missing variable B and 1 for C:101
𝐴𝐵̅𝐶
• Next , write the binary value of the A and attach a 1 for the missing variable B and 0 for C:110
𝐴𝐵𝐶̅
• Next , write the binary value of the A and attach a 1 for the missing variable B and C for C:111
𝐴𝐵𝐶̅

25
Chapter 3 Boolean Algebra

For the first term 𝐴𝐵̅ :


• First, write the binary value of the two variables and attach a 0 for the missing variable C: 100.
𝐴𝐵̅𝐶̅
• Next, write the binary value of the two variables and attach a 1 for the missing variable C: 101.
𝐴𝐵̅𝐶
Map each of the resulting binary values by placing a 1 in the appropriate cell of the 3-variable Karnaugh
map.
𝐵𝐶 00 01 11 10
𝑋 = 𝐴𝐵̅𝐶̅ + 𝐴𝐵̅𝐶 + 𝐴𝐵𝐶̅ + 𝐴𝐵𝐶 + 𝐴̅𝐵𝐶
A

0 1

1 1 1 1

8.5. Karnaugh Map Simplification 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.
8.5.1. 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.
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
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.

26
Chapter 3 Boolean Algebra

8.5.2. Simplified function extraction


When all the 1s representing the standard product terms in an expression are properly 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.
2. Determine the minimum product term for each group.
3. When all the minimum product terms are derived from the Karnaugh map, they are
summed to form the minimum SOP expression.

Example 2: simplify the previous examples given in the mapping section

For 2 inputs kmap: The 1st canonical form of 𝑋 = 𝐴̅𝐵̅ + 𝐴𝐵̅

B 0 𝟏
A
0 1 𝑋𝑠 = 𝐵̅
1 1

For 3 inputs kmap: the 1st canonical form of 𝑋 = 𝐴̅𝐵̅𝐶 + 𝐴̅𝐵𝐶̅ + 𝐴̅𝐵𝐶 + 𝐴𝐵𝐶̅ + 𝐴𝐵𝐶

𝐵𝐶 00 01 11 10

A
𝑋𝑠 = 𝐵 + 𝐴̅𝐶̅
0 1 1 1

1 1 1

For 4 inputs kmap: the 1st canonical form of 𝑋 = 𝐴𝐵̅𝐶𝐷 + 𝐴𝐵𝐶̅ 𝐷


̅ + 𝐴𝐵𝐶̅ 𝐷 + 𝐴𝐵𝐶𝐷
̅ + 𝐴𝐵𝐶𝐷

27
Chapter 3 Boolean Algebra
CD 00 01 11 10

AB

00
𝑋𝑆 = 𝐴𝐵 + 𝐴𝐶𝐷
0 1 3 2
01
4 5 7 6
11 1 1 1 1
12 13 15 14
10 1
8 9 11 10

8.6. Karnaugh Map Simplification POS Expressions

The POS is much the same to SOP except that with POS expressions, 0s representing the standard sum
terms are placed on the Karnaugh map instead of 1s.

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.

When a POS expression is completely mapped, there will be a number of 0s on the Karnaugh map
equal to the number of sum terms in the standard POS expression. The cells that do not have a 0 are
the cells for which the expression is 1. Usually, when working with POS expressions, the 1s are left off.

(A + B + C̅) (𝐴̅ + 𝐵 + 𝐶) (𝐴̅ + B + C̅ )


𝐵𝐶 00 01 11 10

0 0
1 0 0

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 CD 00 01 11 10 product
terms. The rules for grouping the 0s are the AB same as
those for grouping the 1s.
00 0 0 0 0
𝐵𝐶 00 01 11 10 0 1 3 2
A 01 0 0 0 0
4 5 6
0 0 7
11
1 0 0
12 13 15 14
10 0 0 0
𝑋𝑆 = (B + C̅) (𝐴̅ + 𝐵) 8 9 11 10

𝑋𝑆 = 𝐴 (𝐷 + 𝐵)( 𝐴̅ + 𝐵 + 𝐶)

Grouping the 1s yields an SOP expression that is equivalent to grouping the 0s.

28

You might also like