Boolean Algebra: Chapter - 2
Boolean Algebra: Chapter - 2
BOOLEAN ALGEBRA
Binary Valued Quantities:- The values 0(False) and 1(True) are called binary
valued quantities.
Binary Valued Variables:- The variables which can store the truth values 0(False)
and 1(True) are called binary valued variables. These variables can store one of the
two values 1 or 0(True or false).
Truth Table:- Truth table is a table which represents all the possible values of
logical variables / statements along with all the possible results for the given
combinations of values.
Logical statements can have only one of the two values 1(True) of 0(False)
Example:- In the truth table below X and Y are the logical statements and R is the
result.
X Y R
0 0 0
0 1 0
1 0 0
1 1 1
(ii) OR Operator
AND Operator
AND Operator takes two or more input variables and generates the only one output.
It performs the logical multiplication operation of Boolean algebra and is denoted
by symbol dot(.). Thus X.Y will be read as X AND Y.
0.1=0
1.0=0
1.1=1
X Y R
0 0 0
0 1 0
1 0 0
1 1 1
In the truth table only when both X and Y are true the result X.Y is true. If any one of
X and Y is 0, the result is 0.
x y
OR Operator
OR Operator takes two or more input variables and generates the only one output.
OR Operator performs the logical addition operation of Boolean algebra and is
denoted by a symbol Plus(+). Thus X+Y will be read as X OR Y.
0+0=0
0+1=1
1+0=1
1+1=1
X Y X+Y .
0 0 0
0 1 1
1 0 1
1 1 1
In the truth table when any one or both X and Y is 1, the result X+Y is 1, and if both
X and Y is 0, X+Y is 0.
Venn Diagram for OR operator (X+Y)
NOT Operator
0=1
1=0
X X
o 1
1 0
In the truth table if X value is 0 then X will be 1 and if X value is 1 then X will
result 0.
X X
Example 1:- Consider the expression X+YZ. Here three variables X, Y, Z are
forming the expression.
Solution:- Each variable can assume the value 0 or 1. The possible combinations of
values may be arranged in ascending order as in Table 1.1
X Y Z Y.Z YZ
0 0 0 0 1
0 0 1 0 1 Note that YZ contains complemented values of YZ.
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 0 1
1 1 0 0 1
1 1 1 1 0
Now values of X are ORed (logical addition) to the values of YZ and the
resultant values are contained in the last column (Table 1.4).
X Y Z Y.Z YZ X+YZ
0 0 0 0 1 1
0 0 1 0 1 1
0 1 0 0 1 1
0 1 1 1 0 0
1 0 0 0 1 1
1 0 1 0 1 1
1 1 0 0 1 1
1 1 1 1 0 1
Now observe the expression X+YZ, after ANDing Y and Z, the result has been
complemented and then ORed with X.
Example 2:- Verify the Boolean expression X+XY = X using truth.
X Y XY X+XY
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
X Y X Y XY XY XY+XY
0 0 1 1 1 0 1
0 1 1 0 0 1 1
1 0 0 1 0 0 0
1 1 0 0 0 0 0
(b) Truth table for XY Z + X Y Z is as follows :
X Y Z X Y Z XYZ X YZ XYZ+XYZ
0 0 0 1 1 1 0 0 0
0 0 1 1 1 0 0 1 1
0 1 0 1 0 1 0 0 0
0 1 1 1 0 0 0 0 0
1 0 0 0 1 1 0 0 0
1 0 1 0 1 0 0 0 0
1 1 0 0 0 1 1 0 1
1 1 1 0 0 0 0 0 0
X Y Z X Y Z XYZ XY XYZ+XY
xyz
0 0 0 1 1 1 0 0 0
0 0 1 1 1 0 0 0 0
0 1 0 1 0 1 1 0 1
0 1 1 1 0 0 0 0 0
1 0 0 0 1 1 0 1 1
1 0 1 0 1 0 0 1 1
1 1 0 0 0 1 0 0 0
1 1 1 0 0 0 0 0 0
Example 5:- prepare truth table for the following Boolean algebra
expressions:
(a) X(Y+Z) +X Y (b) XY (Z+YZ)+Z (c) A[(B+C)+C]
Solution (a) Truth table for X(Y+Z)+XY is as follows :
x x
0 1
1 0
The OR gate has two or more input signals, but only one output signal. The out
will be the logical addition of the inputs.
Truth table for OR Gate
X Y F
X Y Z F
0 0 0
0 1 1 0 0 0 0
O
1 0 1 0 0 1 1
0
1 1 1 0 1 0 1
0 1 1 1
Two variable truth table 1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
AND gate
The AND Gate has two or more input signals, but only one output signal.
The out will be the logical multiplication of the inputs.
0+0=0 0
OR 0
0
0+1=1 0
OR 1
1
1
1+0=1 OR 1
0
1
1+1=1 OR 1
1
III AND Relations (Logical Multiplication)
0.0 = 0
0.1 = 0
1.0 = 0
1.1 = 1
IV Complement Rules
0=1 0 1
1=0 1 0
PRINCIPLE OF DUALITY
i. Changing each OR sign (+) to an AND sign (.)
ii. Changing each AND sign (.) to an OR sign (+)
iii. Changing each 0 by 1 and each 1 by 0.
Now working according to above guidelines, '+' is changed to '.' 0's are replaced by
1’s and 1’s are replaced by 0’s, these equations become
1) Properties of 0 and 1
a) 0+ x=x
Proof:- If x = 0, then LHS = 0 + x
=0+0
=0 { By OR relation }
=x
= RHS
If x = 1, then LHS = 0 + x
=0+1
=1 { By OR relation }
=x
= RHS
O x R=0+x
0 0 0
0 1 1
As X can have values either 0 or 1 (postulate 1) both the values ORed with 0 produce
the same output as that of X. hence proved.
(b) 1 + x = 1
Proof:- If x = 0, LHS = 1 + x
=1+0
=1 { By OR relation }
= RHS
If x = 1, LHS =1+x (
=1+1
=1 { By OR relation }
= RHS
.
LHS = RHS hence proved.
Truth table for above expression is given below in Table where R signifies the
output or result.
1 x R=1 + x
1 0 1
1 1 1
Again x can have values 0 or 1. Both the values (0 and 1) ORed with1
produce the output as 1. Therefore 1+X=1 is a tautology.
(c) 0 . X = 0
Proof:- If x=0 LHS = 0.x
= 0.0 { By AND relation }
=0
= RHS
If x = 1, LHS = 0.x
= 0.1 { By AND relation }
=0
= RHS
0 X R=0.X
0 0 0
0 1 0
Both the values of X (0 and 1), when ANDed with, produce the output as 0.
Hence proved. Therefore, 0.X=0 is a fallacy.
(d) 1 . X = X
Proof:- If x = 0, LHS = 1.x
= 1.0
=0 { By AND relation }
=x
=RHS
If x = 1, LHS = 1.x
= 1.1
=1 { By AND relation }
=x
=RHS
1 X 1.X
1 0 0
1 1 1
2) Indempotence Law
This law states that when a variable is combined with itself using OR
or AND operator, the output is the same variable.
X
a) X + X = X OR X (gate representation for (a))
X
X
AND X
b) X . X = X X (gate representation for (b))
(a) X + X = X
Proof :- If x = 0 consider LHS = x + x
=0+0
=0 { By OR relation }
=x
=RHS
If x = 1, consider LHS = x + x
=1+1
=1 { By OR relation }
=x
=RHS
As X is to be ORed with itself only, we will prepare truth table with the two
possible values of X (0 and 1).
X X X+X
0 0 0
1 1 1
(b) X.X = X
x x x.x
0 0 0
1 1 1
Truth Table for X.X = X
3) Involution Law
X x x
0 1 0
1 0 1
Proof: If x = 0, LHS = x + x
=0+1 (x = 1)
=1 { By OR relation }
= RHS
If x = 1, LHS = x + x
=1+0
=1 { By OR relation }
= RHS
We will prove x + x=1 with the help of truth table which is given below :
X x x+x
0 1 1
1 0 1
(b) X.X = 0
Proof: If x = 0, LHS = x . x
= 0 . 1 ( x = 1)
=0 { By AND relation }
= RHS
If x = 1, LHS = x . x
= 1 . 0 ( x = 0)
=0 { By AND relation }
= RHS
X
X R Y OR R
AND R = Y AND
R
OR = Y X
Y X
a) x + y = y + x
=y+0
=y
Therefore, for x = 0, x+y=y+x LHS = RHS
If x = 1 then LHS = x + y
=1+y
=1
RHS = y + x
=y+1
=1
X Y X+Y Y+X
0 0 0 0
0 1 1 1
1 0 1 1
1 1 1 1
(b) X . Y = Y . X
Proof: If x = 0 LHS = x . y
= 0 .y
=0
RHS = y . x
=y.0
=0
If x = 1 then LHS = x . y
=1.y
=y
RHS = y. x
= y.1
=y
X Y X.Y Y.X
0 0 0 0
0 1 0 0
1 0 0 0
1 1 1 1
6) Associative Law
These laws state that
(a) X + (Y + Z) = (X + Y) + Z (associative Law of addition)
X X+Y
R R
X = Y
Y Z
Z Y+Z
Compare the columns X+(Y+Z) and (X+Y)+Z, both of these are identical.
Hence proved.
X
Y Z Y.Z X.Y X.(Y.Z) (X.Y).Z
X
0 0 0 0 0 0 0
X
0 0 1 0 0 0 0
0
0 1 0 0 0 0
0
0 1 1 1 0 0 0
1 0 0 0 0 0 0
1 0 1 0 0 0 0
1 1 0 0 1 0 0
1 1 1 1 1 1 1
1
Both the columns X. (Y. Z) = (X.Y). Z are1identical, hence proved.
1
7) Distributive Law
This law states that
(a) X (Y + Z) = XY+XZ X X+Y
Y
X R OR R
Y AND =
OR X
Z Y+Z Z X+Z
Both the columns X(Y+Z) and XY+XZ are identical, hence proved.
a) X+XY = X
b) X(X+Y)=X
X Y XY X+XY
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
X Y X+Y X(X+Y)
0 0 0 0
0 1 1 0
1 0 1 1
1 1 1 1
X
X
R = X R=X+Y
XY Y
Y
(a) X+XY=X+Y
=0 + 0y =0+Y
=0+ y =Y
= y
=1 + 1y =1+Y
= 1+ 0 =1
= 1
X Y X
XY X+Y X+XY
0 0 1 0 0 0
0 1 1 1 1 1
1 0 0 0 1 1
1 1 0 0 1 1