Lecture Week 3-Digital Logic
Lecture Week 3-Digital Logic
2
Faster than a calculator…..
Review of Week 2 (1)
Question:
Describe the followings with suitable examples :
a. Tautology
b. Contradiction
c. Logical equivalence
d. Inverse ,converse and contra positive of conditional
4
Review of Week 2 (2)
Question:
Determine the validity of the following arguments:
p → q , q → r , r ├ p
If I am not in Malaysia, then I am not happy; if I am
happy, then I am singing; I am into singing;
therefore, I am not in Malaysia.
5
Review of Week 2 (3)
Question:
Check for the validity for the following logical
consequence.
p q, q r ├ p
r
6
Any Questions?
7
Boolean Algebra:
• Operation of all modern digital computers is based on
binary system.
8
Boolean Algebra:
• The Complement is the inverse of a variable and is
indicated by a bar over variable (overbar).
10
Logic Gates (Contd.):
• Real life examples:
11
Common Logic Gates:
12
Not Gate:
• Input (A)
• Truth Table
A NOT A (A)
1 0
0 1
Output
13
OR Gate:
• Truth Table
A B A +B
0 0 0
0 1 1
1 0 1
1 1 1
14
AND Gate:
• Truth Table
A B A .B
0 0 0
0 1 0
1 0 0
1 1 1
15
NAND Gate
A A NAND B
B
• Truth Table
A B A NAND B
0 0 1
0 1 1
1 0 1
1 1 0
16
NOR Gate
A A NOR B
B
• Truth Table
A B A NOR B
0 0 1
0 1 0
1 0 0
1 1 0
17
XOR Gate:
• XOR, or exclusive OR gate
– An XOR gate produces 0 if its two inputs are the
same, and a 1 otherwise
– Note the difference between the XOR gate
and the OR gate; they differ only in one
input situation
– When both input signals are 1, the OR gate produces
a 1 and the XOR produces a 0
31
XOR Gate:
32
Logic Circuits:
• Gates can be combined together in various ways to
make circuits with output from one gate serving as
input (or part of the input) to another. Such circuits are
called logic circuits.
• Example: Labeling the circuit diagram
A AB AB
B
21
Logic Circuits (Contd.):
• Example
22
Logic Circuits (Contd.):
• Truth Table of Corresponding Circuit:
A B C B AB (A B) + C
A
1 1 1 0 0 1
B
1 1 0 0 0 0
1 0 1 1 1 1
C
1 0 0 1 1 1
0 1 1 0 0 1
0 1 0 0 0 0
0 0 1 1 0 1
0 0 0 1 0 0
23
Another Boolean Algebra (Contd.)
The operations +, and ͞ consequently satisfy the basic
laws 1, 2 and 3 of Boolean algebra. That is:
1. A+BB+A
ABBA
Commutative Laws
2. (A + B) + C A + (B + C)
(A B) C A (B C)
Associative Laws
3. A (B + C) (A B) + (A C)
A + (B C) (A + B) (A + C) 24
Another Boolean Algebra (Contd.)
4. A + low = A A high = A
Identity Laws
(or A + 0 = A and A 1 = A)
5. A + A = high A A = low
Complement Laws
(or A + A = 1 and A A = 0)
9. A + (A . B) = A A (A + B) = A
Absorption Laws
10. A = A
Double Negation
Law
26
11. A + B = A B AB=A+B De
Another Boolean Algebra (Contd.)
Boolean Algebra laws are very important for simplifying
Boolean expressions and the main objectives of
simplification is to minimize the number of gates .
You all are requested to practice the Boolean algebra laws
thoroughly and be able to use it whenever it is
necessary .
27
Exercises …
Construct the logic circuit and truth for the following
expressions.
1) Z ( A B) C
2) Z A B C
3) Z (A C) (B C )
4) Z (A B) (A C )
5) Z A (B C)
28
Any Questions?
29
Summary: Week 3 Lecture
• Concept of Boolean Algebra
• Logic Gates
• Digital Logic Families
30
What to Expect: Week 3 Tutorials
31
Thank you