You are on page 1of 44

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/343361413

Chapter Three: Boolean Algebra

Chapter · August 2020

CITATIONS READS

0 1,520

1 author:

Qasim Mohammed Hussein


Tikrit University
98 PUBLICATIONS   126 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Computer Vision and Image Analysis, Understanding and Processing View project

Cryptography View project

All content following this page was uploaded by Qasim Mohammed Hussein on 01 August 2020.

The user has requested enhancement of the downloaded file.


Chapter Three: Boolean Algebra

Boolean Algebra
Object
To be familiar with Boolean algebra postulates and
theorems, and how to represent the Boolean expression
in digital logic circuit.
3.1 Theory
George Boole in 1854 developed a system of
mathematical logic, which we now called Boolean
algebra. Based on Boole’s idea, Claude Shannon in
1938 showed that circuits built with binary switches
can easily be described using Boolean algebra.
A Boolean algebra is an algebraic structure defined on
a set of elements (0 and 1), two binary operators ("+"
and " . "), with operation rules equivalent to the AND
and OR operations, and a complement operator
equivalents to the NOT operator. The complement (the
inverse) of variable is represented by a "bar" over the
letter. For example, the complement of A is A or
The variables used in Boolean expression have only
one of two possible values, 0 and 1. Any digital circuit

Assist. Prof Dr. Qasim Mohammed Hussein Page 73


Chapter Three: Boolean Algebra

can be described by a logical expression, also known as


a Boolean function. A Boolean expression can have
infinite number of variables, all labeled individually to
represent inputs to the expression. The most important
application of Boolean algebra is the simplification of
logic circuit by using Boolean theorem.
Like any algebra, Boolean algebra is based on a set of
rules that are derived from a small number of basic
assumption and theorems.
Boolean algebra satisfies the following postulates:
1. a) Closure with respect to the operator " + ".

b) Closure with respect to the operator"•"

2. a) An identity element with respect to "+", it


designated by 0:

X + 0 = 0 + X = X.

b) An identity element with respect to "•",


designated by 1:
X . 1 = 1 . X = X.
3. a) Commutative with respect to " + ":
X + Y = Y + X.
Assist. Prof Dr. Qasim Mohammed Hussein Page 74
Chapter Three: Boolean Algebra

b) Commutative with respect to "•": X .Y = Y.X

4. a) "." is distributive over " + " :


X . ( Y + Z) = ( X . Y ) + ( X . Z)
b) "+" is distributive over "•":
X + ( Y . Z ) = ( X + Y ) . ( X + Z)

5. For every element XB , there exists an element


XB (called the complement of x) such that :
a) X + X = 1 and,
b) X . X = 0.
6. There exists at least two elements X, Y  B such
that X ≠ Y.

Boolean algebra postulates and theorems


The basic theorem of Boolean algebra and its
postulates are in the table (3-1). The Boolean
postulates and theorems are useful in manipulating and
simplifying the Boolean expression. We can proof
each one by using either truth table or using the
postulates and theorem.

Assist. Prof Dr. Qasim Mohammed Hussein Page 75


Chapter Three: Boolean Algebra

Table (3-1): Boolean algebra postulates and theorems


Postulate a) X + 0 = X b) X. 0 = 0
Postulate a) X + X = 1 b) X . X =0
Theorem a) X+X=X b) X . X= X
Theorem a) X+1 = 1 b) X . 1 = X
Theorem:
De-Morgan X=X
law
Postulate: a) X+Y=Y+X b) X.Y=Y.X
Commutative

Theorem: a) b)
Associative X+(Y+Z)=(X+Y)+Z X(Y.Z)=(X.Y).Z
Postulate: a) b)
Distributive X(Y+Z)=X.Y+X.Z X+YZ=(X+Y)(X+Z)

Theorem: a) b)
De Morgan (X+Y) = X . Y (X.Y) = X + Y
Theorem: a) b)
Absorption X + X .Y = X X(X+Y)=X

Example 3.1: Prove X+X=X


Proof: X+X = (X+X).1 by X.1=X

Assist. Prof Dr. Qasim Mohammed Hussein Page 76


Chapter Three: Boolean Algebra

= (X+X)(X+X) by X+X=1
= X + X.X by X+YZ=(X+Y)(X+Z)
=X+0 by X.X=0
=X by X+0 =X
Example 3.2: Prove X + 1 = 1?
Proof: X + 1 = 1. (X+1) by X.1 = X
= (X+X)(X+1) by X+X=1
= X + X.1 by (X+Y)(X+Z)=X+YZ
=X+X by X.1=X
=1 by X+X=1
Example 3.3: Prove X.(X+Y)=X using truth table?
Proof:
X Y X+Y X.(X+Y)
0 0 0 0
0 1 1 0
1 0 1 1
1 1 1 1
Also, one can proof it by using the algebraically
method as following:
X.(X+Y) = XX + XY
= X +XY
= X . (1+Y)

Assist. Prof Dr. Qasim Mohammed Hussein Page 77


Chapter Three: Boolean Algebra

=X.1 =X
Example 3.4 Prove X + YZ = (X+Y)(X+Z)?
Proof: We can be proved using Boolean algebra as
follow: (X+Y)(X+Z) = XX+XZ+XY+YZ
by distributive law
= X + XZ + XY + YZ by X.X=X
= X.(1+Z) + XY + YZ by distributive law
= X.1 + XY + YZ by 1+Z =1
= X.(1 +Y ) + YZ by distributive law
= X .1+ YZ by 1+Y=1
= X + YZ by X.1 =X
Or we can be proved the true of this theorem by
construct the truth table as shown in the below table.
X Y Z X+Y X+Z (X+Y)(X+Z YZ X+YZ
0 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0
0 1 0 1 0 0 0 0
0 1 1 1 1 1 1 1
1 0 0 1 1 1 0 1
1 0 1 1 1 1 0 1
1 1 0 1 1 1 0 1
1 1 1 1 1 1 1 1

They are equaled

Assist. Prof Dr. Qasim Mohammed Hussein Page 78


Chapter Three: Boolean Algebra

We need to show that the left-hand side of the


expression is equal to the right-hand side for every
combination of values for the three variables X, Y, and
Z. We see the column of (X+Y)(X+Z) equals the
column of X+YZ
Example 3.5: Using truth table, prove that
X (Y + Z) = (X Y) + (X Z)?
X Y Z Y+Z (X Y) (X Z) X (Y + Z) (X Y) + (X Z)
0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0
0 1 0 1 0 0 0 0
0 1 1 1 0 0 0 0
1 0 0 0 0 0 0 0
1 0 1 1 0 1 1 1
1 1 0 1 1 0 1 1
1 1 1 1 1 1 1 1

Example 3.6: Proof by using Boolean algebra that


X + (X . Y) = X?
The proof:
X+ (X.Y) = (X. 1) + (X.Y) by X.1=X
= X. (Y+1) by (X.(Y+Z) = (X.Y+X.Z)
= X. (1) by X+1=1
=X by X.1 =X

Assist. Prof Dr. Qasim Mohammed Hussein Page 79


Chapter Three: Boolean Algebra

Example 3.7: Prove that X+ X Y = X + Y


The proof:
X + X Y = (X + XY) + XY by X = X+XY
= (XX + XY) + XY by X = XX
= (XX +XY + 0 + XY by X+0=X
= XX + XY + XX + XY by XX=0
= X (X+X) + Y (X+X)
= (X+X)(X+Y) by factoring
= 1. (X+Y) by X+X=1
= X+Y by drop the 1

3.2 Operator Precedence


Since there are several operators are used in the same
expression, the precedence is given to the operators to
order of operations. The operator precedence is used
for evaluating the Boolean expression has the
following priority, from highest to lowest priority.
1. Parentheses.
2. NOT.
3. AND
4. OR.

Assist. Prof Dr. Qasim Mohammed Hussein Page 80


Chapter Three: Boolean Algebra

The order of evaluation can be changed by means of


using parenthesis. For example the expression
F = X.Y + Z means (X AND Y) OR (NOT Z), and the
expression
F = X. (Y + Z) means X AND (NOT (Y OR Z)).

3.3 Duality Principle


In the table (3-1) the postulates, axioms, and theorems
are listed in pairs, because the first part may be
obtained from the second part if the binary operators
and the elements are interchange. This property is
called duality principle.
The dual of a logic expression is obtained by changing
all "+" operators with "•" operators, and vice versa, and
by changing all 0’s with 1’s, and vice versa. For
example, the dual of the logic expression
(ABC) + (A B ) + (ABC) is
(A+B+C) . (A+B). (A+B+C)
The advantage of duality principle state that if a
Boolean expression is true, then it's dual is also true,
but is not equivalent to its dual.

Assist. Prof Dr. Qasim Mohammed Hussein Page 81


Chapter Three: Boolean Algebra

3.4 Boolean expression for a logic circuit


To find the Boolean expression for a given logic
circuit, we begin at the leftmost inputs and work
toward the output, writing the expression for each gate.
For example Boolean expression of the circuit in the
following figure drives as follow:

1. The expression for the leftmost AND gate with


inputs C and D is CD.
2. The output of leftmost 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 OR gate is one of the inputs to the
rightmost AND gate and A is the other input.
Therefore, the expression for the rightmost AND
gate is A.(B+CD), which represent the final
expression A(B + CD).

Assist. Prof Dr. Qasim Mohammed Hussein Page 82


Chapter Three: Boolean Algebra

Example 3.8: Use Boolean algebra to show that the


following circuit is equivalent to a 2-input XOR gate?

Solution
From the circuit, we get F = (((XY)X) ((XY)Y) )
F= [((XY).X) + ((XY) Y)]
= ((XY) X) + ((XY) Y)
= (X +Y) X + (X + Y )Y
= (XX +XY + XY + YY)
= (0 + XY + XY + 0)
= (XY + XY)
=XY
Example 3.9: Show using Boolean algebra that
(AB + AB + A + B + C)(A + B + C)= B + A C + AC?
Solution
Taking the left side
(AB + A B + A + B + C ) (A + B + C)
= ABA + AB B + ABC + ABA + ABB + ABC +
AA + AB + AC + BA + BB + BC + CA + CB + CC
= AB + AB + ABC + 0 + 0 + ABC + 0 + AB + AC

Assist. Prof Dr. Qasim Mohammed Hussein Page 83


Chapter Three: Boolean Algebra

+ AB + B + BC + AC + BC + 0
= AB + ABC + ABC + AB + AC + B + BC + AC
+ BC
= B(A + AC + A + 1 + C + C) + AC(B + 1) + AC
= B + AC + AC
= Right side
Example 3.10: find the Boolean function of the following
diagram?

Solution
The Boolean function is

Assist. Prof Dr. Qasim Mohammed Hussein Page 84


Chapter Three: Boolean Algebra

Experiment No. (3)


Procedure:
1. Draw and implement the logic circuit for all
Boolean algebra laws, and find its truth table?
2. Prove by connecting the equivalent circuits and find
truth tables?
XYZ + XYZ = Y (X Z)?
Discussion:
1. Prove using truth table?
A) ABC + ABC + ABC = AB + AC
B) A + AB = A + B.
C) (A+B)(A+C)=AC+AB+BC
D) ABC + ABC + ABC + ABC = C
E) (A + B) . B = AB
2. Implement a logic circuit that has three inputs it's
output equal to 1 whenever it's input is prime?

Assist. Prof Dr. Qasim Mohammed Hussein Page 85


Chapter Three: Boolean Algebra

DeMorgan’s Theorems
Object
To be familiar with the DeMorgan’s theorems and its
applications.
3.5 Theory
The DeMorgan’s theorem is a set of rules that
demonstrates any logic function can be formed from
(NAND) gates or from (NOR) gates. These rules may
be summarized in the following statement:
1. The complement of a sum (ORed) of variables is
equal to the product of the complement these
variables. For example, (A+B) = A.B.
2. The complement of the product (ANDed) of
variables is equal to the sum of the complement of
these variables. For example, (A . B) = A+B.

a) X=A. B b) X=(A+B)
Fig (3-1)

Assist. Prof Dr. Qasim Mohammed Hussein Page 86


Chapter Three: Boolean Algebra

The following table illustrates the truth tables of using


De Morgan's theorems of the two expressions
A B A.B (A+B)
0 0 1 1
0 1 0 0
1 0 0 0
1 1 0 0

De Morgan’s theorems can also applied to expressions


in which there are more than two variables.
The complement of a function, denoted by F, can be
obtained from the truth table for F by simply changing
all the 0’s to 1’s and 1’s to 0’s.

Example3.11: Using a truth table, find the complement


of the function F= ABC + ABC + BC?
Solution
We can get F from the truth table in table (3-2) under
the column labeled F.

Assist. Prof Dr. Qasim Mohammed Hussein Page 87


Chapter Three: Boolean Algebra

Table (3-2)

The Boolean function F, in the sum-of-products format,


where the AND terms are obtained from those rows
where F = 1. So, we get:
F =ABC+ABC+ABC+ABC
A complement of a any Boolean function, or any part
of any expression, can get algebraically by using De
Morgan’s theorems through doing two steps. They are:
1. The "+" symbol are replaced with " . " symbols and
the " . " symbol are replaced with "+".
2. Each of the terms in the expression is complemented.

Assist. Prof Dr. Qasim Mohammed Hussein Page 88


Chapter Three: Boolean Algebra

3.6 Using De Morgan’s theorems


To apply DeMorgan's theorems for an expression, there
is a sequence of steps that used as follow. For example,
let we have the expression ((A+BC) + D(E+F)), the
steps are:
1. Divide the expression in sub expressions and apply
DeMorgan's theorems for single operator. We start
from the lowest operator in the expression. The
following figure shows the sequence of applying
DeMorgan's theorems.

After applying DeMorgan's theorems, the expression


((A+BC) + D (E+F)) become ((A + BC) ) (D(E + F) ).

2. Exploit the rule A =A to remove the double bar


from the left sub-expression.

= (A + BC) (D (E + F) ).

3. Applying DeMorgan's theorem to the right sub-


expression:

Assist. Prof Dr. Qasim Mohammed Hussein Page 89


Chapter Three: Boolean Algebra

= (A + B C) (D + ((E + F ) )
4. Again, exploit the rule A = A to cancel the double
bars over the E + F.

The result is:

((A+BC) + D (E + F)) = (A + B C)(D + E + F)

Example 3.12: find the complement of the Boolean


function F = ABC + ABC + BC using De Morgan’s
theorems?
Solution
The function is F = ABC + ABC + BC
We obtain F as follows
F = (ABC + ABC + BC)
= (ABC) • (ABC) • (BC)
= (A+B+C ) • (A+B+C) • (B+C )

Example 3.13: Find the complement of the Boolean


function F1= (A+B).(C+AB) using truth table and De
Morgan’s theorems ?
Solution
Firstly, we find the complement using truth table.

Assist. Prof Dr. Qasim Mohammed Hussein Page 90


Chapter Three: Boolean Algebra

The complement using De Morgan’s theorems is:


F1= (A+B).(C+AB)
F1 = ((A+B).(C+AB))
F1 = (A.B)+ (C.(A+B)).
Table (3-3)
A B C A+B C+
A.B (A.B) F1 A+B A+B C.(A+B) F1

0 0 0 0 0 0 0 1 1 1 1

0 0 1 0 0 1 0 1 1 0 1

0 1 0 1 1 1 1 0 0 0 0

0 1 1 1 1 1 1 0 0 0 0

1 0 0 1 0 0 0 0 1 1 1

1 0 1 1 0 1 1 0 1 0 0

1 1 0 1 0 0 0 0 1 1 1

1 1 1 1 0 1 1 0 1 0 0

The results of the truth table illustrates that F1 is the


complement of the truth table F1.

Assist. Prof Dr. Qasim Mohammed Hussein Page 91


Chapter Three: Boolean Algebra

Experiment No. (4)


Procedure:
1. Connect the circuits in fig (3-1-a) and (3-1-b), find
their truth tables and compare the two results?
2. Connect the circuits in fig (3-2) and (3-3), find their
truth table and compare the two results?
3. Connect the circuits in fig (3-4) and fig (3-5) and
compare between them?

Fig (3-2) :X=A+B

Fig (3-3): X=(A.B)

Assist. Prof Dr. Qasim Mohammed Hussein Page 92


Chapter Three: Boolean Algebra

Fig (3-4)

Fig (3-5)
Discussion:
1. Find the complement of F1 and F2 using De
Morgan theorem?
F1 = Y (X  Z); F2 = ( A + B) ( C + D)
2. Using De Morgan theorem, what is the relation
between F3 and F4?

Assist. Prof Dr. Qasim Mohammed Hussein Page 93


Chapter Three: Boolean Algebra

F3 = (A + B) + (AB + A B)
F4 = ( A + B ) + ( AB)
3. What is the relation between the circuits in fig ( 5-4)
and fig (5-5) ?
4. Prove that?
A) (A + AB) . ( B + AB) = A  B
B) AC + ABC + ACD + CD = AC + CD

Assist. Prof Dr. Qasim Mohammed Hussein Page 94


Chapter Three: Boolean Algebra

Boolean Function Forms


Object:
To get familiar about Boolean function and its
expression and representation.
3.7 Theory:
Boolean algebra provides a way to express the
operation of a logic circuit formed by a combination of
logic gates so that the output can be determined for
various combinations of input values.
A Boolean function is an expression formed with
binary variables, operators (the two binary operators
OR and AND, and the unary operator NOT),
parentheses, and equal sign. The value of a function
evaluates to either a 0 or a 1 depending on the given
set of values for the input variables. A variable X is
called a Boolean variable. X takes the values either 0
or 1.
A Boolean function may be represented in a truth
n
table. The number of rows in the table is 2 , where n is
the number of input binary variable in the function.

Assist. Prof Dr. Qasim Mohammed Hussein Page 95


Chapter Three: Boolean Algebra

For example, the truth table of the Boolean function


F1= X . Y + Z is shown in table (3-4).
Table (3-4): The truth table of the function F1
Input Output
X Y Z F1
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1

A Boolean function may be transformed from an


algebraic expression into a logic diagram composed of
gates. When Boolean function is implemented with
logic gates, each literal in the function designates as
input to a gate, and each term is implemented with a
gate. The logic diagram of F1 is shown in fig (3-6).

Assist. Prof Dr. Qasim Mohammed Hussein Page 96


Chapter Three: Boolean Algebra

Fig (3-6): Logic diagram of F1

When designing a logic circuit, the logical design,


works from two sets of known values:
1. The various states which the inputs to the logical
network can take.
2. The desired outputs for each input condition.

3.8 Boolean function Expressing


Although the truth table representation of a Boolean
function is unique, it can express algebraically in
different forms:
4. Canonical form. In this form, each term includes all
the input variable, either normal or complement, and
these variables ANDed or ORed together, such as:
F1 = A B C + A B C + A B C + A B C
F2 = (A+B+C) . (A+B+C) . (A+B+C) . (A+B+C)

Assist. Prof Dr. Qasim Mohammed Hussein Page 97


Chapter Three: Boolean Algebra

5. Standard (simplification) form. At least one term in


the function is missing at least one variable, such as:
F = ABC + ABC + BC
6. Non standard form. common variables in a standard
form expression can be factored out, such as:
F = A(BC + BC) + BC .
The variable A is factored from the first two terms.

Example 3.14: Find the Boolean function for the


circuit that it has output 0 only when X=1, Y=1, Z=1;
X=0, Y=0, Z=0; X=1, Y=0, Z=0; X=0, Y=1, Z=1. The
other cases of output is 1?
Solution
The truth table is:
Input Output
X Y Z F
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0

Assist. Prof Dr. Qasim Mohammed Hussein Page 98


Chapter Three: Boolean Algebra

F(X,Y,Z) =XYZ+XYZ+XYZ+XYZ ; Or
F(X,Y,Z)=(X+Y+Z).(X+Y+Z).(X+Y+Z).(X+Y+Z)

Example 3.15: Derive the Boolean function for the


following logic circuit?

Solution
F(A,B,C,D) = AB+ (AB)C + (AB)D

3.9.1 Canonical form


There are two types of canonical forming:
1. Sum of minterm.
2. Product of maxterm.
3.9.2 Minterm and maxterm
A product term is a term with either a single variable,
or two or more variables ANDed together. And a sum
Assist. Prof Dr. Qasim Mohammed Hussein Page 99
Chapter Three: Boolean Algebra

term is a term with either a single variable, or two or


more variables ORed together. To differentiate
between a term that contains any number of variables
with a term that contains all the variables used in the
function, we use the words minterm and maxterm.
A minterm is a product term that contains all the
inputs variables used in the function. For a function
with n variables, the notation mi where 0 ≤ i < 2n, is
used to denote the minterm whose index i is the binary
value of the n variables such that the variable is
complemented if the value assigned to it is a 0, and
uncomplemented if it is a 1. For example, the binary
variable, say y, may appear in each term either in the
normal form (Y) or in its complement form ( Y ). In
other word, for a given row of the truth table, the
minterm is formed by including Yi if Yi =1 and by Yi
if Yi=0.
For a Boolean function of n variables, the maxterm is
obtained from an OR term of the input binary
variables, the variable being complemented if the

Assist. Prof Dr. Qasim Mohammed Hussein Page 100


Chapter Three: Boolean Algebra

corresponding value of binary number is a 1 and


uncomplemented if a 0.

Example 3.16: Table (3-5) shows a table that includes


the relationship between inputs and outputs may be
expressed in minterm and maxterm form f or a
Boolean function with two inputs, X and Y, and an
output, Z.
Table (3-5): Minterms and maxterms of two variables
Input Input Minterm Maxterm
X Y
0 0 X.Y X+Y
0 1 X.Y X+Y
1 0 X.Y X+Y
1 1 X.Y X+ Y

3.9.3 Sum of Minterms


A Boolean function is expressed by forming a minterm
for each combination of the input variables which
produce a 1 in the function and taking the OR of all
those term. For example, in the table (3-5) whenever

Assist. Prof Dr. Qasim Mohammed Hussein Page 101


Chapter Three: Boolean Algebra

Z is equal to 1 the X and Y product term from the


same row is selected and formed into a sum products
expression; therefore, the minterm from the first, third
and fourth rows are selected. So, the function F1 that
represented in table (3-5) can be expressed in the sum
of minterm as the following
F1(X,Y,Z) = XYZ + XYZ + XYZ + XYZ + XYZ
(3-1)
= m1 + m3 + m4 + m5 + m7
F1(X,Y,Z) = ∑(1,3,4,5,7)
The letters in parentheses following F1 form is a list of
the function input variables, which are taken when the
minterm is converted to sum of AND terms.
The summation symbol,  , denotes the ORing of
minterms. The numbers following it are the minterms
of the function.
Example 3.17: Express in a sum of minterms (SOP)
the Boolean function F = A + B.C?
Solution
The term A is missing two variables because F has
three inputs (A, B, C).

Assist. Prof Dr. Qasim Mohammed Hussein Page 102


Chapter Three: Boolean Algebra

First, we find SOP for the first term, A.


A = A(B + B) = AB + AB because B + B = 1
AB(C + C) = ABC + ABC
AB(C + C) = ABC + ABC
The second term BC is missing A, so
BC(A + A) = ABC + ABC
F = ABC + ABC + ABC + ABC + ABC + ABC
There is two similar terms with value ABC, and
because A+A=A. So, we take one of them.
F = ABC + ABC + ABC + ABC + ABC
F = m7 + m6 + m5 + m4 + m1
So F(A,B,C) can expressed as:
F(A, B, C) = Σ(1, 4, 5, 6, 7)

3.9.4 Product of Maxterms


A Boolean function is expressed by forming a
maxterm for each combination of the input variables
which produce a 0 in the truth table and taking the
AND of all those terms.
For example, the function F1 that represented in table
(3-4) can be expressed as the following:

Assist. Prof Dr. Qasim Mohammed Hussein Page 103


Chapter Three: Boolean Algebra

F1(X,Y,Z)=(X+Y+Z)(X+Y+Z)(X+Y+Z) (3-2)
= M0. M2. M6
The product symbol, , denotes the ANDing of
maxterms. F1(X,Y,Z) = (0, 2, 6)
Each sum term in that does not contain all the input
variables can be converted for maxterm by using the
Boolean algebra rule A.A=0 as shown in the following
steps:
1. Add 0 to each sum term that has missing variable.
And substitute the 0 by the missing variable ANDing
with its complement (adding 0 to anything will not
change its value). The result is two sum terms.
Suppose the term is B, and the missing variable is A.
B = B+ 0
2. Apply the distributive of Boolean algebra:
B+AA=(B+A)(B+A)
3. Repeat the two steps until all sum terms contain all
input variables.
Example 3.18: Express in the product of maxterm the
Boolean function F = AB + AC?

Assist. Prof Dr. Qasim Mohammed Hussein Page 104


Chapter Three: Boolean Algebra

Solution
F = AB + AC = (AB + A)(AB + C)
= (A + A)(B + A)(A + C)(B + C)
Because A+A = 1
F = (B + A)(A + C)(B + C)
by using A+0=A, and AA=0
F = (A + B + CC)(A + BB + C )(AA + B + C)
F = (A + B + C)(A + B + C)(A + B + C)(A + B + C)
(A + B +C)(A + B + C)
Removing one of the duplicated terms. F becomes:
F = (A + B + C)(A + B + C)(A + B + C)(A + B + C)
F = M4. M5. M0 . M2
F = Π(0, 2, 4, 5)
Note: The sum of minterm and the product of maxterm
are complementary to other. To convert the same
function from one to other, there are three methods:
1. Using DeMorgan’s theorem the complement of the
function.

2. Start with the original F and convert it to other


format using the Boolean theorems

Assist. Prof Dr. Qasim Mohammed Hussein Page 105


Chapter Three: Boolean Algebra

3. Interchange the ∑ and Π, then use missing terms.

Example 3.19: The sum of product of the function


F(A,B,C) = AC + B is ∑(1, 2, 3, 6, 7). Express the
function in product of sum form?
Solution
We will find the product of sum in the three methods
as follow:
Method 1
Constructing the truth table as follow:

A B C F F
0 0 0 0 1
0 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 0 0 0 1
1 0 1 0 1
1 1 0 1 0
1 1 1 1 0
From the truth table, we find that
F = ∑(0, 4, 5)
= ABC+ABC + ABC

Assist. Prof Dr. Qasim Mohammed Hussein Page 106


Chapter Three: Boolean Algebra

Now, we take the complement to F and applying De


Morgan's theorems.
F= (ABC+ABC + ABC)
= (ABC) . (ABC) . (ABC)
= (A+B+C) . (A+B+C) . (A+B+C)
= M0. M4. M5 = Π(0, 4, 5)
Method 2: Using Boolean algebra.
F(A,B,C)= AC + B
= (A+B)(C+B)
= (A+B+CC)(C+B+AA)
= (A+B+C)(A+B+C)(C+B+A)(C+B+A)
= (A+B+C)(A+B+C)(A+B+C)(A+B+C)
The last term (A+B+C) is cancelled because it is
duplicated with the first term.
= (A+B+C)(A+B+C)(A+B+C)
= M4. M5. M0 = Π(0, 4, 5)
Method3: We make use of the complementary
between sum of product and product of sum.
F(A,B,C) = ∑(1, 2, 3, 6, 7)
F(A,B,C) = Π (2,3,5)

Assist. Prof Dr. Qasim Mohammed Hussein Page 107


Chapter Three: Boolean Algebra

Where the numbers 2, 3, and 5 are missing from the


sum of minterm representation.
To construct a truth table from sum of product (SOP)
or product of sum (POS) expressions, list all the
possible combinations of binary values of the
variables. Next, convert the POS expression to
standard form if it is not already. Finally, place a 1 in
the output column (X) for each binary value that
appear in ∑ , and place 0 and for the binary value that
appear in Π. But the inverse value in the remaining
possible.

Example 3.20: Determine the truth table for the


following function which is expressed in POS form?
F(A,B,C)=Π (0,2,3,5,6)
Solution
There are three input variables. Since the number of
possible binary value equal to 2input variable number
, so
there are eight possible, table (3-6).

Assist. Prof Dr. Qasim Mohammed Hussein Page 108


Chapter Three: Boolean Algebra

Table (3-6)
Input Output Product of
A B C F sum
0 0 0 0 A+B+C
0 0 1 1
0 1 0 0 A+B+C
0 1 1 0 A+B+C
1 0 0 1
1 0 1 0 A+B+C
1 1 0 0 A+B+C
1 1 1 1
The binary values that make the sum terms in the
expression equal to 0 are A+B+C= 000; A+B+C= 010;
A+B+C= 011; A+B+C= 10l; and A+B+C= 110. For
each of these binary values, place a 0 in the output
column as shown in the table (3-6). For each of the
remaining binary combinations, place a 1 in the output
column.

Example 3.21: Express the following function using


a) P.O.S b) S.O.P? F(A,B,C)= A(B+C)?
Solution
a) Using S.O.P?
F(A,B,C)= A(B+C)
= (A+0)(B+C+0)
Assist. Prof Dr. Qasim Mohammed Hussein Page 109
Chapter Three: Boolean Algebra

= (A+BB)(B+C+AA)
= (A+B)(A+B)(B+C+A)(B+C+A)
= (A+B+CC)(A+B+CC)(A+B+C)(A+B+C)
= (A+B+C)(A+B+C)(A+B+C)(A+B+C)
(A+B+C) (A+B+C)
= M0.M1.M2.M3.M5
= Π (0, 1, 2, 3, 5)
b) Since the P.O.S. is complement of S.O.P, so we can
found the S.O.P directly or by using Boolean
algebra as following.
F(A,B,C)= A(B+C)
= AB + AC
= AB.1 + AC.1
= AB(C+C) + AC(B+B)
= ABC + ABC + ACB + ACB
= ABC + ABC + ABC + ABC
= m7 + m6 + m4
= ∑ (4, 6, 7)
Example3.22: Express in a canonical form the
following function F(X,Y,Z)=XY + Y using:
(a) Sum of minterms

Assist. Prof Dr. Qasim Mohammed Hussein Page 110


Chapter Three: Boolean Algebra

(b) Product of maxterms?


Solution
a) Using sum of minterms
F(X,Y,Z)= XY + Y
= XY(Z+Z)+Y(X+X) by X.1=X and X+X=1
= XYZ+XYZ+XY+XY by X(Y+Z)=XY+XZ
= XYZ+XYZ+XY(Z+Z)+XY(Z+Z)
= XYZ+XYZ+XYZ+XYZ+XYZ+XYZ
= m3 + m2 + m5 + m4 + m1 + m0
=∑ (0,1,2,3,4,5)
(b) F(X,Y,Z)= XY + Y
= (X+Y)(Y+Y) by distributive law.
= X+Y by Y+Y=1 and X.1 = X
= X+Y+0
= X+Y+ZZ
= (X+Y+Z)(X+Y+Z)
= Π (6,7)

Example 3.23: Prove that


A B C D = ∑(0,3,5,6,9,10,12,15)
Solution

Assist. Prof Dr. Qasim Mohammed Hussein Page 111


Chapter Three: Boolean Algebra

A B C D = (A B) (C D) + (A B) (C D)
= (AB)(CD) + (A B) (C D)
= (AB+AB)(CD+CD)+(AB+AB)(CD+CD)
= ABCD + ABCD + ABCD + ABCD + ABCD
+ ABCD + ABCD + ABCD
= m5 + m6 + m9 + m10 + m0 + m3 + m12 + m15
= ∑ (0, 3, 5, 6, 9, 10, 12, 15)

Assist. Prof Dr. Qasim Mohammed Hussein Page 112


Chapter Three: Boolean Algebra

Experiment No. (5)


Procedure:
1. Connect the logic circuit required to implement the
function Z in equation number (6-1) and write the
truth table for the circuit?
2. Connect the logic circuit required to implement the
function Z in equation number (6-2) and write the
truth table for the circuit.
3. Derive the Boolean Algebra expression for a gating
network that will have outputs 0 only when ( X=1 ,
Y=1 , Z=1) (X=0 , Y=0 , Z=0 ) ( X=1 , Y=0 , Z=0 )
the outputs are to be 1 for all other cases?
4. Connect the circuit which derived in step 3 and write
the truth table for it?
5. Express using sum of minterms and product of
maxterms for F (shown in table 3-7)?
6. Connect the circuit that implement F in step 5 and
find the truth table for it?

Assist. Prof Dr. Qasim Mohammed Hussein Page 113


Chapter Three: Boolean Algebra

Table (3-7)
X Y Z F
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1` 1

Discussion:
1. Prove theoretically that function number (3-1) is a
complement of function number (3-2)?
2. Express the Boolean function F(A,B,C)=A(B+C) in a
canonical form using product of sum?
3. Design and draw the logic circuit that have an output
(0) when (X=1 , Y=1 , W=0 , Z=0 ) , ( X=1 , Y=1 ,
W=0 , Z=1) , ( X=1 , Y=1 , W=1 , Z=1 ), ( X=1 ,
Y=1 , W=1 , Z=0 ) the outputs are to be 1 for all
other cases?

Assist. Prof Dr. Qasim Mohammed Hussein Page 114


Chapter Three: Boolean Algebra

4. Convert the following expression to sum of minterm


form?
A) (A +B)(C+B).
B) ( AB(BC+BC)).
C) (A+B+D)(A+B+D)(C+D)(C+D)
5. Prove algebraically that ABC = ∑ (1, 2, 4, 7)?
6. Prove that Z + Y + Y . Z = 1?

Assist. Prof Dr. Qasim Mohammed Hussein Page 115

View publication stats

You might also like