8/7/2019 logic gates-5,6
1/18
prepared by : maher al-omari
Digital design
CHAPTER 2
Logic Gates
Sec 2-7
8/7/2019 logic gates-5,6
2/18
prepared by : maher al-omari
Binary logic
Binary variables logic operators.+
1. AND: x . y =xy ; equal 1 ifx=1 &
y=1.
2. OR: x + y ; equal 1 ifx=1ory=1.
3. NOT: x= x .
X , y , z
8/7/2019 logic gates-5,6
3/18
prepared by : maher al-omari
The difference between binary arithmetic and binary logic.
binary arithmetic binary logic
Addition :1 + 1 = 10
Multiplication : 1 . 1 = 1
OR: 1 + 1 = 1
NOT: 1 = 1 = 0
NOT: 0 = 0 = 1
AND : 1 . 1 = 1
AND : 1 . 0 = 0
8/7/2019 logic gates-5,6
4/18
prepared by : maher al-omari
Truth table of logic operations
111
001
010
000
X.YYX
111
101
110
000
X+YYX
01
10
XX
AND
OR NOT
8/7/2019 logic gates-5,6
5/18
prepared by : maher al-omari
Logic Gates Inverter
AND Gate OR Gate
Exclusive-OR Gate NAND Gate
NOR Gate
Exclusive-NOR Gate
8/7/2019 logic gates-5,6
6/18
prepared by : maher al-omari
The Inverter
Truth table
0 = LOW1 = HIGH Pulsed waveforms
The output of an inverter is always theThe output of an inverter is always the
complement (opposite) of the input.complement (opposite) of the input.
8/7/2019 logic gates-5,6
7/18
prepared by : maher al-omari
The AND Gate
Truth table
0 = LOW1 = HIGH
Pulsed waveforms
The output of an AND gate is HIGH onlyThe output of an AND gate is HIGH only
when all inputs are HIGH.when all inputs are HIGH.
8/7/2019 logic gates-5,6
8/18
prepared by : maher al-omari
The AND Gate
33--Input AND GateInput AND Gate
44--Input AND GateInput AND Gate
8/7/2019 logic gates-5,6
9/18
prepared by : maher al-omari
The OR Gate
Truth table
0 = LOW1 = HIGH
The output of an OR gate is HIGHThe output of an OR gate is HIGH
whenever one or more inputs are HIGHwhenever one or more inputs are HIGH
Pulsed waveforms
8/7/2019 logic gates-5,6
10/18
prepared by : maher al-omari
The OR Gate
33--Input OR GateInput OR Gate
44--Input OR GateInput OR Gate
8/7/2019 logic gates-5,6
11/18
prepared by : maher al-omari
The NAND Gate
Truth table
0 = LOW1 = HIGH
The output of a NAND gate is HIGHThe output of a NAND gate is HIGH
whenever one or more inputs are LOW.whenever one or more inputs are LOW.
Pulsed waveforms
8/7/2019 logic gates-5,6
12/18
prepared by : maher al-omari
The NAND Gate
33--Input NAND GateInput NAND Gate 44--Input NAND GateInput NAND Gate
8/7/2019 logic gates-5,6
13/18
prepared by : maher al-omari
The NOR Gate
Truth table0 = LOW1 = HIGH
The output of a NOR gate is LOWThe output of a NOR gate is LOW
whenever one or more inputs are HIGH.whenever one or more inputs are HIGH.
Pulsed waveforms
8/7/2019 logic gates-5,6
14/18
prepared by : maher al-omari
The NOR Gate
33--Input NOR GateInput NOR Gate 44--Input NOR GateInput NOR Gate
8/7/2019 logic gates-5,6
15/18
prepared by : maher al-omari
Exclusive-OR Gate
Truth table
0 = LOW1 = HIGH
The output of an XOR gate is HIGHThe output of an XOR gate is HIGH
whenever the two inputs are different.whenever the two inputs are different.
Pulsed waveforms
8/7/2019 logic gates-5,6
16/18
prepared by : maher al-omari
Exclusive-NOR Gate
Truth table
0 = LOW1 = HIGH
The output of an XNOR gate is HIGHThe output of an XNOR gate is HIGHwhenever the two inputs are identical.whenever the two inputs are identical.
Pulsed waveforms
8/7/2019 logic gates-5,6
17/18
prepared by : maher al-omari
Positive & Negative Logic
In logic gates, usually:
H (high voltage, 5V) = 1
L (low voltage, 0V) = 0
H (high voltage) = 0
L (low voltage) = 1
positive logic
convention
the reverseconvention,
negative logic
MANO sec 2-7
8/7/2019 logic gates-5,6
18/18
prepared by : maher al-omari
Positive logic:
Negative logic:
Enable
Active High:
0: Disabled1: Enabled
Enable
Active Low:
0: Enabled
1: Disabled
Positive & Negative Logic
complemented
form.
Un complemented form.
MANO sec 2-7