Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
LAB MANUAL
CPCS 211
Digital Logic Design
Prepared By:
Aman Ullah
2012(1) - 1433
Term
Spring 2012
Lab 3: Boolean Algebra and Logic Gates
Statement Purpose:
In this lab we shall discuss about the Boolean algebra, basic theorems and properties of Boolean algebra,
logical operations, types of logic gates, and simplification of Boolean expressions using axioms and
postulates.
Activity Outcomes:
The students will learn about the application of Boolean Algebra in circuit designing. They will also know
how to minimize the Boolean expressions using the axioms and postulates of Boolean algebra. This will
ultimately help them in designing logical circuits with as few logic gates as possible.
Instructor Note:
Read the lab notes carefully and thoroughly. All the examples have been solved in an easy to understand
manner. You should not find it difficult to learn the topics given in these lab notes. Try to solve all the
exercises yourself that are given at the end of notes. These exercises will certainly help you in achieving the
objectives of this lab.
A basic circuit is called a logic gate; its function can be represented mathematically.
What is inside the gate is not of concern to the system/computer designer (Only its
function)
Boolean Algebra:
In 1854, George Boole introduced a systematic treatment of logic and for this purpose
developed an algebraic system now called Boolean algebra.
Boolean algebra, like any other deductive mathematical system, may be defined with a set of
elements, set of operators and a number of axioms or postulates.
Two Valued Boolean Algebra:
A two valued Boolean algebra is defined on a set of two elements B = {0, 1} with rules for
the two binary operators + and . as shown below:
X Y X.Y X Y X+Y X X’
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
These rules are exactly the same as the AND, OR and NOT operations respectively.
Boolean Function:
A binary variable can take the value of 0 or 1. A Boolean function is an expression formed
with binary variable, the two binary operators + and . , the unary operator ‘ (complement),
parenthesis and equal sign.
For a given value of variables, Boolean function can be either 0 or 1. For example, the
Boolean function F = XYZ’ will be equal to 1 when X=1, Y=1 and Z’=1 (or Z=0). Otherwise
F=0.
Operator Precedence:
The operator precedence for evaluating Boolean expression is
1. Parentheses
2. NOT (i.e. Complement)
3. AND (i.e. .)
4. OR (i.e. +)
Truth Table:
A truth table is one which lists all the possible values of all the variables involved in a
Boolean expression. It shows the output of each and every gate involved in the expression as
well as the final output of the entire Boolean expression.
Constructing a Truth Table:
Write out the names of variables involved in the Boolean expression along with the
output of each and every gate and the final output of the entire Boolean expression.
In order to write the values of the variables, just start from the right most variable’s
column and go on writing one 0, one 1 and so on, for the next variable, go on writing
two o’s and two 1’s and so on, for the next variable, go on writing four 0’s and four
1’s and so on.
The number of entries in the truth table will be equal to 2n for ‘n’ number of variables.
For example, if there are 3 variables involved in a Boolean expression, there will be
23=8 entries (i.e. rows) in the truth table.
Exercise:
x+y.z = (x+y).(x+z)
Solution:
(ii) F2 = x . ( x’+ y)
Solution:
F2 = x . ( x’+ y)
= (x.x’) + (x.y) (By 14 above) (4 literals, 2 terms)
= 0 + x.y (By 8 above)
= x.y (By 1 above) (2 literals, 1 term)
Note:
Procedure of finding complement of a function is comprised of two steps:
Step 1: Take dual of the function (i.e. interchange + and . signs)
Step 2: Complement each literal (i.e. convert primed literal into unprimed literal and vice
versa.
Examples:
1. Simplify the following Boolean functions to a minimum number of literals:
(i) xy + xy’
(ii) (x + y)(x + y’)
(iii) (A + B)’(A’ + B’)’
(iv) y.(wz’ + wz) + xy
Solution:
(i) xy + xy’ = x.(y + y’) = x.1 = x
Exercises:
Exercises:
Solution:
Exercise:
Take complement of the following Boolean functions and simplify them to minimum
number of literals:
(i) xy+xy'
Solution:
Assignment No 2
(ii) F = zx + zx’y
Also implement the simplified Boolean functions using AND, OR and NOT gates.
Q. No. 2: Find the complement of the following Boolean functions and reduce them to a minimum
number of literals:
(ii) F = [(AB)’A][(AB)’B]
Q. No. 3: Implement the Boolean function F = xy + x’y’ + y’z using only AND and NOT gates.
A B C T1 T2
0 0 0 1 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 0 1
1 0 1 0 1
1 1 0 0 1
1 1 1 0 1
Note:
Use Cedar Logic Simulator to implement the above Boolean functions