CH 3 BooleanLogic G11 CS

Download as pdf or txt
Download as pdf or txt
You are on page 1of 62

 Boolean Logic : NOT, AND, OR,

NAND, NOR, XOR, NOT


 Truth tables

 De Morgan’s laws

 Logic circuits
INTRODUCTION
 Boolean Logic also known as Boolean
Algebra was developed by a mathematician
‘George Boole’
 Boolean Logic deals with Binary values
 True or False / 0 or 1 / Yes or No / On or Off
 Also called Switching Algebra
The decision which results into either
BINARY DECISIONS YES(TRUE) or NO(FALSE)

Values true and false are


TRUTH VALUES called Truth values

Boolean variables can have value


BOOLEAN VARIABLES either as 1 (True) or as 0 (False)
LOGICAL OPERATIONS
Table which contains all possible values
TRUTH TABLE of logical variables/statements along
with all the possible results

A B
0 0
0 1
1 0
1 1
If the result of any logical statement or
TAUTOLOGY expression is always TRUE or 1, for all
input combinations, it is called Tautology

If the result of any logical statement or


FALLACY expression is always FALSE or 0 for all
input combinations, it is called Fallacy
LOGICAL OPERATORS

NOT
AND
OR
NOT OPERATOR
 Operates on single variable – unary operator
 Also known as Complementation
 Represented using bar or '
__
0 = 1 X X
__ 0 1
1 = 0 1 0
OR OPERATOR
 Logical addition +
 X+Y or X OR Y

X Y X OR Y
0+0=0
0 0 0
0+1=1 0 1 1
1+0=1 1 0 1
1+1=1 1 1 1
AND OPERATOR
 Logical multiplication .
 X.Y or X AND Y

X Y X AND Y
0.0=0
0 0 0
0.1=1 0 1 0
1.0=1 1 0 0
1.1=1 1 1 1

A truth table of n input variables will have 2n input combinations


EXAMPLE-1:
Using Boolean Logic, verify using truth table that
X + XY = X for each X, Y in [0,1]

X Y XY X+XY
EXAMPLE-2:
Using Boolean Logic, verify using truth table that
(X + Y)’= X’Y’ for each X, Y in [0,1]

X Y X+Y (X+Y)’ X’ Y’ X’Y’


BOOLEAN LOGIC
A gate is a basic electronic circuit which

LOGIC GATE operates on one or more signals to


produce an output signal

Types of Logic gates:

Inverter
OR Gate AND Gate
(NOT gate)
NOT GATE
• Inverter gate
• One input signal and one output signal
• Output is always the opposite of input

A X
OR GATE
• Has two or more input signals but only one output signal
• If any of the input is 1, the output is 1
• Otherwise the output is 0

A
X
B
AND GATE
• Has two or more input signals but only one output signal
• If all the inputs are 1, the output is 1
• Otherwise the output is 0

A
X
B
BASIC POSTULATES OF BOOLEAN LOGIC
I. If X ≠ 0 then X=1 and if X ≠ 1 then X=0

II. OR Relations ( Logical Addition)


0 + 0 = 0; 0 + 1 = 1; 1 + 0 = 1; 1+1=1

III. AND Relations (Logical Multiplication)


0 . 0 = 0; 0 . 1 = 0; 1 . 0 = 0; 1.1=1

IV. Complement Rules:


__ __
0 = 1 1 = 0
PRINCIPLE OF DUALITY

1. Change each OR (+) to AND (.)

2. Change each AND (.) to OR (+)

3. Replace 0 by 1 and 1 by 0
Give the dual of X + 0 = X
Write the dual of
(i) (X+Y).(X’+Z’).(Y+Z)
(ii) (A+0).(A.1.A’)
(iii) ABC+AB’C+A’BC’
NOR GATE
• Has two or more input signals but only one output signal
• If all the inputs are 0, the output is 1
• Otherwise the output is 0

A
X
B
NOR GATE
A B C Output
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0
NAND GATE
• Has two or more input signals but only one output signal
• If all the inputs are 1, the output is 0
• Otherwise the output is 1

A
X
B
NAND GATE
A B C Output
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
XOR GATE
• Exclusive OR gate
• Has two or more input signals but only one output signal
• Produces output 1 for only those input combinations that
have odd number of 1’s

A
X
B
XOR GATE
A B C Output
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
XNOR GATE
• Exclusive NOR gate
• Has two or more input signals but only one output signal
• Produces output 1 for only those input combinations that
have even number of 1’s

A B Output
0 0 1
0 1 0
1 0 0
1 1 1
XNOR GATE
A B C Output
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
BASIC THEOREMS OF BOOLEAN LOGIC
1. Properties of 0 and 1 4. Complementarity Law
(a) 0 + X = X (a) X + X’ = 1
(b) 1 + X = 1 (b) X . X’ = 0
(c) 0 . X = 0
(d) 1 . X = X 5. Commutative Law
(a) X + Y = Y + X
2. Indempotence Law (b) X . Y = Y . X
(a) X + X = X
(b) X . X = X 6. Associative Law
(a) X + (Y + Z) = (X + Y) + Z
3. Involution Law (b) X (YZ) = (XY) Z
(X’)’=X
7. Distributive Law
(a) X(Y + Z) = XY + XZ
(b) X + YZ = (X + Y)(X + Z)

8. Absorption Law
(a) X + XY = X
(b) X (X + Y) = X

9. Third Distributive Law


X + X’ Y = X + Y
1. Properties of 0 and 1
(a) 0 + X = X
(b) 1 + X = 1
(c) 0 . X = 0
(d) 1 . X = X
2. Indempotence Law

(a) X + X = X (b) X . X = X

X X X+X X X X.X
3. Involution Law
(X’)’=X

X X’ (X’)’
4. Complementarity Law
(a) X + X’ = 1 (b) X . X’ = 0

X X’ X+X’ X X’ X.X’
5. Commutative Law

(a) X + Y = Y + X (b) X . Y = Y . X

X Y X+Y Y+X X Y X.Y Y.X


6. Associative Law
(a) X + (Y + Z) = (X + Y) + Z (b) X (YZ) = (XY) Z

X Y Z Y+Z X+ (Y+Z) X+Y (X+Y)+Z


6. Associative Law
(b) X (YZ) = (XY) Z

X Y Z YZ X(YZ) XY (XY)Z
7. Distributive Law
(a) X(Y + Z) = XY + XZ (b) X + YZ = (X + Y)(X + Z)

X Y Z Y+Z X(Y+Z) XY XZ XY+XZ


7. Distributive Law
(b) X + YZ = (X + Y)(X + Z)
X Y Z YZ X+YZ X+Y X+Z (X+Y)(X+Z)
8. Absorption Law
(a) X + XY = X (b) X (X + Y) = X

X Y XY X+XY X X+Y X(X+Y)


9. Third Distributive Law
X + X’ Y = X + Y

X Y X’ X’Y X+X’Y X+Y


DeMorgan’s First Theorem
(X + Y)’ = X’ Y’

X Y X’ Y’ X+Y (X+Y)’ X’Y’


DeMorgan’s Second Theorem
(X . Y)’ = X’ + Y’

X Y X’ Y’ X.Y (X.Y)’ X’+Y’


XOR GATE
XNOR GATE
DESIGN A CIRCUIT FOR THE GIVEN FUNCTIONS
(A+B)C
AB+AC
A + BC + D
Q=AB+BC(B+C)
(A+B)(C+D)C
F(X,Y,Z)=(X+Y).(X+Z).(Y+Z)
F(A,B,C)=AB + AC + B A C
From the given circuits, derive a
LOGICAL EQUATION and draw
TRUTH TABLE for the same.
JINI N K

You might also like