Professional Documents
Culture Documents
1
Chapter Outline
Introduction
Boolean Algebra
Basic and Derived Logic Gates
The Inverter
The AND Gate
The first three are basic logic gates
The OR Gate and the rest are derived from them
The NAND Gate
The NOR Gate
The Exclusive-OR and Exclusive-NOR Gates
2
2
Introduction
Digital (logic) circuit operates in the binary mode
Symbols used:
1
X is the complement of A
A X is the inverse of A
X is NOT A
"A bar"
"not A"
6
Discrete NOT Gate
+5 V
R
A Y
0 1
Y
1 0
A
T Truth Table
Transistor as Inverter
7
2. The AND Gate
Performs ‘logical multiplication’
– If all of the input are HIGH, then the output is HIGH.
– If any of the input are LOW, then the output is LOW.
Symbols used:
&
A A
X X
B B
8
AND gate operation:
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
99
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
t1 t2 t3 t4 t5
10
Logic expressions for AND gate:
AND gate performs Boolean multiplication
0.0=0
0.1=0
1.0=0
1.1=1
11
11
Discrete AND Gate
+5 V +5 V
A B X
0 0 0
A Y
A T1 Y
0 1 0
1 0 0
B B T2 T3
1 1 1
Two-input
diode AND Gate Two-input Truth Table
Transistor AND gate 12
3. The OR Gate
Performs ‘logical addition’
– If any of the input are HIGH, then the output is HIGH.
– If all of the input are LOW, then the output is LOW
Symbols used:
1
A A
X X
B B
13
The OR gate operation:
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)
14
14
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
15
Logic expressions for OR gate:
OR gate performs Boolean addition
Boolean addition follows the basic rules as
follows:
0+0=0
0+1=1
1+0=1
1+1=1
16
16
Discrete OR Gate
D1
+5 V
A Y
A B Y
B 0 0 0
D2
R 0 1 1
Y
1 0 1
Two-input R
A T1 T2 T3 1 1 1
diode OR Gate
B
Truth Table
Two-input
17
Transistor OR gate
4. 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
X
B
A A (b) Rectangular outline: 2 input
X X NAND gate with polarity indicator
B B
18
The NAND gate operation:
A
X
LOW (0)
B
HIGH (1)
LOW (0)
HIGH (1)
LOW (0)
HIGH (1) A
LOW (0)
B X
HIGH (1)
HIGH (1)
C
HIGH (1)
LOW (0)
HIGH (1)
19
19
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
20
Logic expressions for NAND gate:
Boolean expression for NAND is a combination
of AND and Inverter Boolean expressions.
INPUTS OUTPUT
A B AB AB = X
0 0 0 0.0 = 0 = 1
0 1 0 0.1 = 0 = 1
1 0 0 1.0 = 0 = 1
1 1 1 1.1 = 1 = 0
21
Universality of NAND Gates
A Y = A.A = A
INVERTER
A AB
Y = AB
B
AND
A
A
Y=A B
B
B OR
22
Discrete NAND Gate
+5 V
A B Y
0 0 1
R
0 1 1
A Y
1 0 1
1 1 0
B T
Truth Table
HIGH (1)
LOW (0)
HIGH (1)
25
25
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
t1 t2 t3 t4 t5
26
Logic expressions for NOR gate:
Boolean expression for NOR is a combination of
OR and Inverter Boolean expressions.
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
27
Universality of NOR Gates
Similarly, it can be shown that NOR gates can be
arranged to implement any of the Boolean operations.
See fig. below
A Y = A+A= A
INVERTER
A AB
Y = A+B
B
OR
A
A
Y = A+B
B 28
B AND
Discrete NOR Gate
+5 V
A B Y
Y
0 0 1
A T1 T2 0 1 0
B
1 0 0
1 1 0
HIGH (1) A
HIGH (1) X
LOW (0) B
LOW (0)
HIGH (1)
HIGH (1)
HIGH (1)
LOW (0)
HIGH (1)
31
31
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
1 0 1 0 0
0 0 1 1 0
t1 t2 t3 t4 t5
32
7. The Exclusive-NOR gate
• Has only 2 inputs, but output of XNOR is
the opposite of XOR
– If both of the input are at the same logic level, then
the output is HIGH.
– If both of the input are at opposite logic levels, then
the output is LOW.
• Symbol used:
A =1
A
X X
B B
33
The XNOR gate operation:
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)
34
34
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
1 0 1 0 0
1 1 0 0 1
t1 t2 t3 t4 t5
35
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
36
36
Describing Logic Circuits Algebraically
Any logic circuit, no matter how
complex, may be completely A.B Y=A.B+C
described using the Boolean A
input levels
For example: suppose that we
want to know the logic level of
the output Y for the circuit in
Y ABC A D
the figure for the case where = 0.1.1.( 0 + 1)
A=0, B=1, C=1, and D=1. = 1.1.1.(1)
As in ordinary algebra, the =0
0
1 0
D=1 1
41
Quiz 1
42
THE END!
43