Module 3 Logic Gates (Student)
Module 3 Logic Gates (Student)
1
FACULTY OF COMPUTER SCIENCE & INFORMATION SYSTEM
2
NOT Gate
Example:
0
1
Symbols:
1 0 1
1
Universal gate using
2 of the basic gates 1 0
3 4
• Truth table
• Logic expression
A X
0 1
A X=A
1 0
X is the complement of A
A X is the inverse of A
X is NOT A
"A bar"
"not A"
Continue…
5 6
2012/2013-I @m 1
10/3/12
• Logic operation
A A
& • Truth table
X X (Output)
B B
7 8
Ex
tr
a OR Gate
Exercise 3.1:
(a) Develop the truth table for a 3-input AND gate.
(b) Determine the total number of possible input combinations for a • Performs ‘logical addition’
4-input AND gate.
– If any of the input are HIGH, then the output is HIGH.
Solution: INPUTS OUTPUT – If all of the input are LOW, then the output is LOW
(a) Possible input combinations = 23 = 8 A B C X
• Symbols used:
1
A A
X X
B B
(Output)
Exercise 3.2:
Draw the output waveform.
Continue…
11 12
2012/2013-I @m 2
10/3/12
Ex
tr
a NAND Gate
13 14
(Output)
Continue…
15 16
Ex
tr
a NOR Gate
(Output) (a) Distinctive shape: 2 input NOR (b) Rectangular outline with
gate and its NOT/OR equivalent the OR ( 1) qualifying symbol
Continue…
Resource: Floyd, Digital Fundamentals, 10th Edition, 2009 17 18
2012/2013-I @m 3
10/3/12
Continue…
19 20
Ex
tr
a XOR Gate
Exercise 3.4:
Show the output waveform for the 3-input NOR gate below with its
proper time relationship to the inputs.
A =1
X A
X
B B
(Output)
(a) Distinctive shape (b) Rectangular outline
Continue…
Resource: Floyd, Digital Fundamentals, 10th Edition, 2009 21 22
Continue… Continue…
23 24
2012/2013-I @m 4
10/3/12
XNOR Gate
1 0
XOR
AB+AB
X = AB + AB X = AB + AB
Continue… Continue…
27 28
2 X = AB + AB
Continue…
29 30
2012/2013-I @m 5
10/3/12
Ex
tr
a
Exercise 3.5:
Determine the output waveforms for the XOR gate and XNOR gate,
Example: given the input waveforms, A and B.
1
1
0
1
1
0 (Output)
1
0
(Output)
1 0
31 Resource: Floyd, Digital Fundamentals, 10th Edition, 2009 32
2012/2013-I @m 6