Chapter 3 Logic
Chapter 3 Logic
Chapter 3 Logic
net/publication/343361413
CITATIONS READS
0 1,520
1 author:
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
All content following this page was uploaded by Qasim Mohammed Hussein on 01 August 2020.
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
X + 0 = 0 + X = X.
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
= (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)
=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
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)
=XY
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
+ 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
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)
Table (3-2)
= (A + BC) (D (E + F) ).
= (A + B C) (D + ((E + F ) )
4. Again, exploit the rule A = A to cancel the double
bars over the E + F.
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
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?
F3 = (A + B) + (AB + A B)
F4 = ( A + B ) + ( AB)
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
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)
Solution
F(A,B,C,D) = AB+ (AB)C + (AB)D
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?
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.
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
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.
= (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
A B C D = (A B) (C D) + (A B) (C D)
= (AB)(CD) + (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)
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?