DLD Lab5 Stmu
DLD Lab5 Stmu
Lab Title:
Boolean Algebra and
Gate Level Minimization
DEPARTMENT OF COMPUTING
45
Experiment No 5
5.1 Objectives
After completing this experiment, student will be able to:
• Experimentally determine the truth tables for circuits with three input variables, and use
DeMorgan’s theorem to prove algebraically whether they are equivalent.
• Comprehend Logic simplification techniques and implement it. Construct circuits from
simplified logic expressions.
46
5.2.1.1 Description of the Laws of Boolean Algebra
A brief description of various laws of Boolean Algebra is given below
5.2.1.1.1 Distributive Law
This law permits the multiplying or factoring out of an expression.
47
5.2.1.1.7 Idempotent Law
An input that is AND‘ed or OR´ed with itself is equal to that input
• Two separate terms NOR‘ed together is the same as the two terms inverted
̅̅̅̅̅̅̅
(Complement) and AND‘ed for example: ̅̅̅̅̅̅̅A+B = A̅̅̅̅̅̅̅ . B̅̅̅̅̅̅̅
• Two separate terms NAND‘ed together is the same as the two terms inverted
̅̅̅̅̅̅̅
(Complement) and OR‘ed for example: A̅̅̅̅̅̅̅.B = A̅̅̅̅̅̅̅ + B̅̅̅̅̅̅̅
5.2.1.2 Boolean Postulates
There are a set of Mathematical Laws which can be used in the simplification of Boolean
Expressions.
0 . 0 = 0 (A 0 AND’ed with itself is always equal to 0)
1 . 1 = 1 (A 1 AND’ed with itself is always equal to 1)
1 . 0 = 0 (A 1 AND’ed with a 0 is equal to 0)
A minterm, denoted as mi, where 0 ≤ i < 2n, is a product (AND) of the n variables in which
each variable is complemented if the value assigned to it is 0, and uncomplemented if it is 1.
1. 0 0 0 0 X’Y’Z’ = m0
2. 0 0 1 0 X’Y’Z = m1
3. 0 1 0 0 X’YZ’ = m2
4. 0 1 1 1 X’YZ = m3
5. 1 0 0 0 XY’Z’ = m4
6. 1 0 1 1 XY’Z = m5
7. 1 1 0 1 XYZ’ = m6
8. 1 1 1 1 XYZ = m7
In the above table 5.1, there are three inputs namely X, Y, Z and the combinations of these
inputs are 8. Every combination has a minterm that is specified with m.
49
5.2.2.1.1 Canonical Sum of Products
This is a normal form of SOP, and it can be formed with grouping the minterms of the function
for which the o/p is high or true, and it is also called as the sum of minterms. The expression
of the canonical SOP is denoted with sign summation (∑), and the minterms in the bracket are
taken when the output is true. The truth table of the canonical sum of the product is shown
below.
Sr. No. X Y Z F
1. 0 0 0 0
2. 0 0 1 1
3. 0 1 0 1
4. 0 1 1 1
5. 1 0 0 0
6. 1 0 1 1
7. 1 1 0 0
8. 1 1 1 0
For the above table, the canonical SOP form can be written as:
F = m1 + m2 + m3 + m5
By substituting the minterms in the above equation we can get the below expression
The product term of the canonical form includes both complemented and non-complimented
inputs.
50
5.2.2.1.2 Non-Canonical Sum of Products
In the non-canonical sum of product form, the product terms are simplified. For
example, let’s take the above canonical expression.
This form is chosen due to the number of input lines & gates are used in this is minimum. It is
profitably useful due to its solid size, quick speed, along with low manufacture price.
This is called sum of products. The + is sum operator which is an OR gate. The product such
as xy is an AND gate for the two inputs x and y.
Example: Minimize the following Boolean function using sum of products (SOP):
f(a,b,c,d) = Σ m(3,7,11,12,13,14,15)
=ab+ab`cd + a`cd
=ab+cd(ab` + a`)
51
=ab+ cd(a + a`)(a`+b`)
= ab + a`cd + b`cd
= ab +cd(a` + b`)
5.2.2.2 Schematic Design of Sum of Product
The expression of the sum of product executes two-level AND-OR design, and this design
requires a collection of AND gates and one OR gate. Each expression of the sum of the product
has similar designing.
The number of inputs and the number of AND gates depend upon the expression one is
implementing. The design for a minimal sum of product & canonical expression using AND-
OR gates is shown above.
The short form of the product of the sum is POS, and it is one kind of Boolean algebra
expression. In this, it is a form in which products of the dissimilar sum of inputs are taken,
which are not arithmetic result & sum although they are logical Boolean AND & OR
correspondingly. Before going to understand the concept of the product of the sum, we have
to know the concept of the max term.
A maxterm, denoted as Mi, where 0 ≤ i < 2n, is a sum (OR) of the n variables (literals) in
which each variable is complemented if the value assigned to it is 1, and uncomplemented
if it is 0.
M3 =m3’
(X’YZ)’ = M3
X+Y’+Z’=M3 (De Morgan’s Law)
Table 5.3: Truth table of Max Term
1. 0 0 0 0 X+Y+Z = M0
2. 0 0 1 1 X+Y+Z’ = M1
3. 0 1 0 1 X+Y’+Z = M2
4. 0 1 1 1 X+Y’+Z’ = M3
5. 1 0 0 0 X’+Y+Z = M4
6. 1 0 1 1 X’+Y+Z’ = M5
7. 1 1 0 0 X’+Y’+Z = M6
8. 1 1 1 0 X’+Y’+Z’ = M7
The product of the sum is classified into three types which include the following.
53
Table 5.4: Truth table of the Canonical Product of Sum
Sr. No. X Y Z F
1. 0 0 0 0
2. 0 0 1 1
3. 0 1 0 1
4. 0 1 1 1
5. 1 0 0 0
6. 1 0 1 1
7. 1 1 0 0
8. 1 1 1 0
For the above table 5.4, the canonical POS can be written as
By substituting the max terms in the above equation, we can get the below expression.
F = (X+Y+Z) (X’+Y+Z)(X’+Y’+Z)(X’+Y’+Z’)
The product term of the canonical form includes both complemented and non-complimented
inputs
F = (X+Y+Z) (X’+Y+Z)(X’+Y’+Z)(X’+Y’+Z’)
F = (Y+Z) (X’+Y+Z) (X’+Y’+Z’)
Similar although reversed terms remove from two Max terms & forms only term to show
it here is an instance.
54
= (X+Y+Z) (X’+Y+Z)
= XX’+XY+XZ+X’Y+YY+YZ+X’Z+YZ+ZZ
= 0+XY+XZ+X’Y+YY+YZ+X’Z+YZ+Z
= X (Y+Z) + X’ (Y+Z) + Y(1+Z) +Z
= (Y+Z) (X+X’) + Y (1) +Z
= (Y+Z) (0) +Y+Z
= Y+Z
The above final expression is still in the form of Product of Sum; however, it is in the form of
non-canonical.
This is the most simplified expression of the product of the sum, and it is also a type of non-
canonical. This type of can is made simplified with the Boolean algebraic theorems although
it is simply done by using K-map (Karnaugh map). This form is chosen due to the number of
input lines & gates are used in this is minimum. It is profitably useful due to its solid size, quick
speed, along with low manufacture price.
The zeros are considered exactly the same as ones in the case of sum of product (SOP).
Example:
f(a,b,c,d) = Π M(0,1,2,4,5,6,8,9,10)
= Σ m(3,7,11,12,13,14,15)
=[(a+b+c+d)(a+b+c+d`)(a+b`+c`+d`)(a`+b+c`+d`)(a`+b`+c+ d)(a`+b`+c+
d`)(a`+b`+c`+d) (a`+b`+c`+d`)]
55
Figure 5.2: Schematic Design of POS
The number of inputs and the number of AND gates depend upon the expression one is
implementing. The design for a minimal sum of product & canonical expression using OR-
AND gates is shown above.
Thus, this is all about Canonical Forms: Sum of Products and Product of Sums, schematic
design, K-map, etc. From the above information finally, we can conclude that a Boolean
expression consists completely any of minterm otherwise maxterm is named as the canonical
expression.
To convert from one canonical form to its other equivalent form, interchange the symbols Σ
and Π, and list the index numbers that were excluded from the original form.
56
Table 5.5: 3-Variable Truth table
Inputs Output
Sr. #
x y z F F'
1. 0 0 0 0 1
2. 0 0 1 0 1
3. 0 1 0 0 1
4. 0 1 1 1 0
5. 1 0 0 0 1
6. 1 0 1 1 0
7. 1 1 0 1 0
8. 1 1 1 1 0
= m3 + m5 + m6 +m7 or
F (x, y, z) = Σ (3, 5, 6, 7)
F ' = x' y' z' + x' y' z + x' y z' + x y' z'
= m0 + m1 + m2 + m4 or
F ' (x, y, z) = Σ (0, 1, 2, 4)
F (x, y, z) = Π (0, 1, 2, 4)
57
5.3 Lab Activities
5.3.1 Task-1
Experimentally determine the truth table 5.6 and 5.7 for circuits shown in figure 5.3 and 5.4
with three input variables, and use DeMorgan’s theorem to prove algebraically whether they
are equivalent.
Figure 5.3
Figure 5.4
58
Table 5.6: Truth table for Figure 5.3
Inputs Output
Sr. No.
A B C X
1. 0 0 0
2. 0 0 1
3. 0 1 0
4. 0 1 1
5. 1 0 0
6. 1 0 1
7. 1 1 0
8. 1 1 1
Inputs Output
Sr. No.
A B C X
1. 0 0 0
2. 0 0 1
3. 0 1 0
4. 0 1 1
5. 1 0 0
6. 1 0 1
7. 1 1 0
8. 1 1 1
59
5.3.2 Task-2
Simplify the given expression to minimum number of literals using Boolean Algebra
simplifications and draw logic diagram. Implement the resultant logic circuit and perform truth
table-based verification.
F (A, B, C) = AB + A (B + C) + B (B + C)
60
5.3.3 Task-3
Convert given expression into Sum of Minterms (SOM). Also convert it into Product of
Maxterms. Implement resultant expression and perform truth table-based verification of
Minterms and Maxterms.
61
Lab Exercise and Summary
62
Student’s Signature: ________________ Date: ________________
63
Evaluation Criteria
Method of Evaluation: Viva, File submitted on LMS.
Assignment All tasks Most tasks Some tasks Most tasks All tasks were
completed were were were incomplete or
correctly in completed completed incomplete or incorrect.
given time correctly. correctly and incorrect and
and have a Tasks could have an have no Didn’t
complete be improved incomplete understanding perform tasks
understanding further and understanding and have no
have a understanding
complete
understanding
Total
64