CHAPTER 2 Logic Gates
CHAPTER 2 Logic Gates
CHAPTER TWO
Logic Gates
Floyd, Digital Fundamentals, 10 th ed © 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights
Reserved
Chapter Outline
2
The Inverter
The AND Gate
The OR Gate
Symbols used:
1
X is the complement of A
A X is the inverse of A
X is NOT A
"A bar"
"not A"
5
The AND Gate
LOW (0)
LOW (0) A
LOW (0) X=A B
B
HIGH (1) AND
LOW (0)
LOW (0)
A
B X=A B C
LOW (0) C
LOW (0)
HIGH (1)
A
HIGH (1) B
C X = ABCD
HIGH (1)
HIGH (1) D
A INPUTS OUTPUT
X=A B
A B X
B or
AND 0 0 0
X = AB
0 1 0
1 0 0
1 1 1
1 0 1 1 0
1 1 1 0 0
1 0 1 0 0
8 t1 t2 t3 t4 t5
Logic expressions for AND gate:
9
1
A A
X X
B B
LOW (0) A
LOW (0) X=A+B
LOW (0)
B
HIGH (1)
HIGH (1) A
LOW (0) B X=A+B+C
C
LOW (0)
HIGH (1)
HIGH (1) A
B X=A+B+C+D
C
HIGH (1) D
HIGH (1)
HIGH (1)
INPUTS OUTPUT
A
X=A+B A B X
B
0 0 0
0 1 1
1 0 1
1 1 1
1 0 0 1 0
1 1 1 0 0
1 1 1 1 0
t1 t2 t3 t4 t5
Logic expressions for OR gate:
13
0+0=0
0+1=1
1+0=1
1+1=1
The NAND Gate
NAND NOT-AND combines the AND gate and an inverter
Used as a universal gate
Combinations of NAND gates can be used to perform AND, OR and INVERTER
OPERATIONS
If all or any of the input are LOW, then the output is HIGH.
If all of the input are HIGH, then the output is LOW
Symbol used:
A A &
A
X X X
B B B
(b) Rectangular outline: 2 input
(a) Distinctive shape: 2 input NAND NAND gate with polarity indicator
gate and its NOT/AND equivalent 14
The NAND gate operation:
LOW (0)
HIGH (1)
LOW (0) A
X
B
HIGH (1)
HIGH (1)
LOW (0) A
B X
LOW (0) C
HIGH (1)
HIGH (1)
HIGH (1)
LOW (0)
HIGH (1)
INPUTS OUTPUT
A
X = AB A B X
B
0 0 1
0 1 1
1 0 1
1 1 0
1 0 0 1 0
1 1 1 0 0
0 1 1 1 1
t1 t2 t3 t4 t5
Logic Expressions For NAND Gate:
18
The NOR Gate
Symbol used:
A A 1
X X A X
B B B
19
The NOR gate operation:
20
LOW (0)
HIGH (1)
LOW (0)
A
X
HIGH (1) B
LOW (0)
LOW (0)
A
LOW (0) B X
LOW (0) C
HIGH (1)
HIGH (1)
LOW (0)
HIGH (1)
INPUTS OUTPUT
A
X=A+B A B X
B
0 0 1
0 1 0
1 0 0
1 1 0
1 0 0 1 0
1 0 1 0 0
0 1 0 0 1
21 t1 t2 t3 t4 t5
Logic expressions for NOR gate:
INPUTS OUTPUT
A B A+B A+B=X
0 0 0 0+0 = 0 = 1
0 1 1 0+1 = 1 = 0
1 0 1 1+0 = 1 = 0
1 1 1 1+1 = 1 = 0
22
The Exclusive-OR gate
23
If both of the input are at the same logic level, then the output is LOW.
If both of the input are at opposite logic levels, then the output is HIGH
Symbol used:
A =1
X A
X
B B
24
The XOR gate operation:
25
LOW (0)
LOW (0)
LOW (0)
HIGH (1) A
HIGH (1) X
LOW (0) B
LOW (0)
HIGH (1)
HIGH (1)
HIGH (1)
LOW (0)
HIGH (1)
INPUTS OUTPUT
A
X = AB + BA A B X
B
=A B 0 0 0
0 1 1
1 0 1
1 1 0
1 0 0 1 0
A Sama 0
Tak sama 1
1 0 1 0 0
0 0 1 1 0
t1 t2 t3 t4 t5
The Exclusive-NOR gate
27
Symbol used:
A =1
A
X X
B B
LOW (0)
LOW (1)
LOW (0)
HIGH (1) A
HIGH (0) X
LOW (0) B
LOW (0)
HIGH (0)
HIGH (1)
HIGH (1)
LOW (1)
HIGH (1)
INPUTS OUTPUT
A
X=A B A B X
B
0 0 1
0 1 0
1 0 0
1 1 1
1 0 0 1 0
Sama 1
A
Tak sama 0
1 0 1 0 0
1 1 0 0 1
t1 t2 t3 t4 t5
XOR vs XNOR
1 0 0 1 0
1 0 1 0 0
0 0 1 1 0
XOR
1 1 0 0 1
XNOR
t1 t2 t3 t4 t5
Fixed-function Logic : IC
Gates
32
Advantage:
Lower power dissipation
There are 2 categories:
5V & 3.3V
Prefix : 74 and 54
74 : commercial grade for general use
54 : military grade for more severe environments
5V Series
74HC and 74HCT – High-speed CMOS
35
74AC and 74ACT – Advanced CMOS
74AHC and 74AHCT – Advanced High-speed CMOS
3.3V Series
74LV – Low-voltage CMOS
74LVC – Low-voltage CMOS
74ALVC – Advanced Low-voltage CMOS
4000 Series
Older, low-speed
TTL
Advantage:
36
Faster switching speed – CMOS is catching up
Greater selection of device types
Not sensitive to electrostatic discharge
All TTL operates on 5V and comes in 74 or 54 prefixes.
TTL Series:
74 – Standard TTL
74S – Schottky TTL
74AS – Advanced Schottky TTL
74LS – Low-power Schottky TTL
74ALS – Advanced Low-power Schottky TTL and 74F – Fast TTL
Types of Fixed-Function Logic
Gates
All the basic logic configurations are available
in some or all of the IC technologies.
These are identified by the last 2/3 digits in the
series designation
Some examples:
37
Quad 2-input NAND → 00 Triple 3-input NAND → 10
38
Quad 2-input AND
8 7 GND
4 AND gates
9 6
Each AND gate has 2 inputs
10 5
8 pins for inputs & 4 pins for outputs
11 4
12 3
13 2
VCC 14 1
39
40