03 DLD
03 DLD
NU-BCS
Lecture 3
Boolean Algebra and Logic Gates
• A + B means A OR B
• A • B means A AND B
• A means NOT A
• Computer is designed on the basic of electronic circuits if
the electronic switch is open (ON) when it is closed (off).
• The circuit use operands AND,OR,NOT.
Boolean Operands
1. Left to Right
2. Parentheses ( ) evaluate first.
3. NOT
4. AND
5. OR
Truth Table
A B C BC A+BC
0 0 0 0 0
0 0 1 0 0
0 1 0 0 0
0 1 1 1 1
1 0 0 0 1
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Draw a truth table for A(B+D)
A B D B+D A(B+D)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 0 0 0 0
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1
Draw a truth table for (A+B)(A+C)
P T Z T PT P+Z PT(P+Z)
0 0 0 1 0 0 0
0 0 1 1 0 1 0
0 1 0 0 0 0 0
0 1 1 0 0 1 0
1 0 0 1 1 1 1
1 0 1 1 1 1 1
1 1 0 0 0 1 0
1 1 1 0 0 1 0
Practice
1. A B C+ A B C+A B C
2. A(B C+ B C)
3. ABC+ABC+ABC
Boolean Identities
Dominance Law
A+1=1 (OR Form)
A·0=0 (AND Form)
Commutative Law
A+B=B+A (OR Form)
A· B = B · A (AND Form)
Associative Law
A + (B + C) = (A + B) + C (OR Form)
A· (B · C) = (A · B) · C (AND Form)
Boolean Identities
Absorption Law
A· (A + B) = A
A + (A · B) = A
Simplification Law
A · (~A + B) = A · B
A + (~A · B) = A + B
Boolean Identities
Distributive Law
A + (B · C) = (A + B) · (A + C)
A · (B + C) = (A · B) + (A · C)
De-Morgan's Law
~(A · B) = ~A + ~B
~(A+ B) = ~A · ~B
Logic Gates
• The three simplest gates are the AND, OR, and NOT gates.
Logic Gates
• (p ∧ ¬r) ∨ (¬q ∧ r)
• ((¬p ∨ ¬r) ∧ ¬q) ∨ (¬p ∧ (q ∨ r)
.
E D
N