Logic Gates & Boolean Algebra
Logic Gates & Boolean Algebra
Logic Gates & Boolean Algebra
INFORMATION
TECHNOLOGY
Faiza Tariq
TEXT AND REF. BOOKS
Text Book:
Peter Norton (2011), Introduction to Computers, 7 /e,
McGraw-Hill
Reference Book:
Gary B (2012), Discovering Computers, 1/e, South
Western
Deborah (2013), Understanding Computers, 14/e,
Cengage Learning
June P & Dan O (2014), New Perspective on Computer,
16/e
MOBILE ALERT
OR
variables .
Basic logical operators are the logic functions AND, OR and
NOT.
Logic gates Implement logic functions.
Boolean Algebra: A useful mathematical system for specifying
Examples:
Y = A.B is read “Y is equal to A AND B.”
Z = x + y is read “z is equal to x OR y.”
AND
OR NO
0·0=0 0 + 0 =0 0T= 1
0·1=0 0+1=1 1= 0
1·0=0 1+0=1
1·1=1 1+1=1
Truth Tables
as follows: Y 0 1 0 1
(AND) X ·Y 0 0 0 1
(OR) X + Y 0 1 1 1
(NOT) X 1 1 0 0
Logic Diagrams and Expressions
Logic Equation
Truth Table
XYZ F = X + Y × Z F = X +Y Z Logic Diagram
X
000 0
001 1 F
Y
010 0
011 0 Z
100 1 Boolean equations, truth tables and logic diagrams describe
101 1 the same function
110 1 Truth tables are unique, but expressions and logic diagrams
111 1 are not. This gives flexibility in implementing functions.
Logic Diagrams and Expressions
Logic Equation TRUTH TABLE
X Y Z ~Y ~Y.Z X+~Y.Z
F = X +Y Z 0 0 0 1 0 0
0 0 1 1 1 1
0 1 0 0 0 0
0 1 1 0 0 0
1 0 0 1 0 1
1 0 1 1 1 1
1 1 0 0 0 1
Logic Diagram 1 1 1 0 0 1
X
Y F
Z
Boolean Algebra
5. X+X =X 6. X .X =X Idempotence
7. X+X =1 8. X .X = 0 Complement
9. X=X Involution
10. X+Y =Y+X 11. XY = YX Commutative
12. (X + Y) + Z = X + (Y + Z) 13. (XY) Z = X(Y Z) Associative
14. X(Y + Z) = XY + XZ 15. X + YZ = (X + Y) (X + Z) Distributive
16. X + Y =X . Y 17. X .Y = X + Y DeMorgan ’s
Boolean Operator
Precedence
The order of evaluation is:
1. Parentheses
2. NOT
3. AND
4. OR
Consequence: Parentheses appear
around OR expressions
Example: F = A(B + C)(C + D)
Boolean Algebraic Proof – Example 1
A+A· B=A (Absorption Theorem)
Proof Steps Justification
A+A· B
= A · 1 + A · B Identity element: A · 1 = A
= A · ( 1 + B) Distributive
=A· 1 1+B=1
=A Identity element