Chapter Two
Chapter Two
1
INTRODUCTION
❑ Digital (logic) circuits operate in the binary mode where each input & output
voltage is either a 0 or 1;
❑ Digital circuits called logic gates can be constructed from diode, transistors,
and resistors connected.
❖ In such a way that the circuit output is the result of a basic logic operation (OR,
AND, NOT) performed on the inputs.
1. THE INVERTER
❑ The inverter (NOT circuit) Performs inversion or complementation.
4
❖0 (LOW) ➔ 1(HIGH) ; 1 ➔ 0;
1
❑ Symbols used:
1
7
❖ If any of the input are LOW, then the output is LOW.
❑ Symbols used:
&
A A
X X
B B
8
Inputs Output 0 0 1 0
0 1 0 0
0 1 1 0
A B X
1 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
…2. AND GATE OPERATION WITH WAVEFORM INPUTS
9
10
+5 V
A B X
11
0 0 0
A Y 0 1 0
1 0 0
B
1 1 1
Two-input
diode AND Gate Two-input Truth Table
Transistor AND gate
3. THE OR GATE
❑ An OR gate can have two or more inputs with a single output and Performs
‘logical addition’
12
❖ If all of the input are LOW, then the output is LOW
❑ Symbols used:
1
A A
X X
B B
D1
A B Y
16
A Y
0 0 0
B
0 1 1
D2
R
1 0 1
1 1 1
Two-input
diode OR Gate Truth Table
Two-input
Transistor OR gate
4. THE NAND GATE
❑ NAND ➔ NOT-AND combines the AND gate and an inverter
❑ Used as a universal gate
A
HIGH (1)
HIGH (1) X
LOW (0) B
LOW (0)
HIGH (1) A
HIGH (1) B X
C
HIGH (1)
LOW (0)
HIGH (1)
…4. NAND GATE TRUTH TABLE & OPERATION WITH WAVEFORM
19
…4. LOGIC EXPRESSIONS FOR NAND GATE:
❑ Boolean expression for NAND is a combination of AND gate and Inverter.
❑ Boolean expressions.
INPUTS OUTPUT
20
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
A Y = A.A = A
INVERTER
A AB
Y = AB
B
AND
A
A
Y=A B
B
B OR
…4. DISCRETE NAND GATE
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
Truth Table
23
operations
❖ If
all or any of the input are HIGH, then the output is LOW.
❖ If all of the input are LOW, then the output is HIGH
❑ Symbol used:
A A 1
X A
X X
B B B
24
X
HIGH (1) B
LOW (0)
LOW (0)
A
LOW (0) B X
LOW (0) C
HIGH (1)
HIGH (1)
LOW (0)
HIGH (1)
…5. NOR GATE TRUTH TABLE & OPERATION WITH WAVEFORM
INPUTS OUTPUT
A
X=A+B A B X
B
0 0 1
0 1 0
1 0 0
25
1 1 0
1 0 0 1 0
1 0 1 0 0
0 1 0 0 1
t1 t2 t3 t4 t5
…5. LOGIC EXPRESSIONS FOR NOR GATE:
❑ Boolean expression for NOR is a combination of OR and Inverter Boolean
expressions.
INPUTS OUTPUT
26
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
…5.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 A+B
Y = A+B
B
OR
A
A
Y = A+B
B
B AND
…5. DISCRETE NOR GATE
A B Y
❑ A simple 2-input logic gate can be
0 0 1
constructed using RTL Resistor-
0 1 0
transistor switches connected together
1 0 0
directly to the transistor bases.
❑ Both transistors must be cut-off “OFF”
1 1 0
29
❖ 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
30
HIGH (1)
HIGH (1)
LOW (0) A
X
LOW (0) B
HIGH (1)
HIGH (1)
HIGH (1)
LOW (0)
HIGH (1)
…6. XOR GATE TRUTH TABLE &OPERATION WITH WAVEFORM
INPUTS OUTPUT
A
X = AB + BA A B X
B
=A B 0 0 0
0 1 1
1 0 1
1 1 0
31
1 0 0 1 0
1 0 1 0 0
0 0 1 1 0
t1 t2 t3 t4 t5
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.
32
❖ 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
HIGH (1) A
HIGH (0) X
LOW (0) B
LOW (0)
HIGH (0)
HIGH (1)
HIGH (1)
LOW (1)
HIGH (1)
…7. NOR GATE TRUTH TABLE & OPERATION WITH WAVEFORM
INPUTS OUTPUT
A
X=A B A B X
B
0 0 1
0 1 0
1 0 0
34
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