Slide 01
Slide 01
Digital logic fundamentals
Logic gates
Combinational circuits
System function circuits
Binary Digits and Logic Levels
VH(max)
HIGH
VH(min)
Invalid
VL(max)
LOW
VL(min)
2
Binary Digits and Logic Levels
5V 5V
2.2V 2.6V
0.8V 0.4V
GND GND
Input Output
3
Binary Digits and Logic Levels
3.3v Logic
3.3V 3.3V
2V 2.4V
0.8V 0.5V
GND GND
Input Output
4
Digital Waveforms
HIGH HIGH
LOW LOW
t0 t1 t0 t1
5
Pulse Definitions
Volts
Pulse
width
Amplitude (A) (tW)
Time
Period, T
6
Serial and Parallel Data
1
Computer Printer
0
0
t0 t1
7
The Inverter
A X
Input Output
A X
LOW (0) HIGH (1)
HIGH (1) LOW(0)
8
The Inverter
A X
Example waveforms:
A
X
A group of inverters can be used to form the 1’s complement
of a binary number: Binary number
1 0 0 0 1 1 0 1
0 1 1 1 0 0 1 0
1’s complement
9
The AND Gate
A A
X & X
B B
The AND gate produces a HIGH output when all inputs are
HIGH; otherwise, the output is LOW. For a 2-input gate,
the truth table is Inputs Output
A B X
0 0 0
0 1 0
1 0 0
1 1 1
10
The AND Gate
A A
X & X
B B
Example waveforms:
A
B
X
The AND operation is used in computer programming as a
selective mask. If you want to retain certain bits of a binary
number but reset the other bits to 0, you could set a mask
with 1’s in the position of the retained bits.
If the binary number 10100011 is ANDed with
the mask 00001111, what is the result? 00000011
11
The OR Gate
A X A ≥1 X
B B
12
The OR Gate
A X A ≥1 X
B B
Example waveforms:
A
B
X
The OR operation can be used in computer programming to set certain
bits of a binary number to 1.
ASCII letters have a 1 in the bit 5 position for lower case letters
and a 0 in this position for capitals. (Bit positions are numbered
from right to left starting with 0.) What will be the result if you
OR an ASCII letter with the 8-bit mask 00100000?
The resulting letter will be lower case.
13
The NAND Gate
A X A & X
B B
The NAND gate produces a LOW output when all inputs
are HIGH; otherwise, the output is HIGH. For a 2-input
gate, the truth table is Inputs Output
A B X
0 0 1
0 1 1
1 0 1
1 1 0
14
The NAND Gate
A X A & X
B B
Example waveforms:
A
B
X
The NAND gate is particularly useful because it is a
“universal” gate – all other basic gates can be constructed
from NAND gates.
How would you connect a 2-input NAND gate
to form a basic inverter?
15
The NOR Gate
A X A ≥1 X
B B
A X A ≥1 X
B B
Example waveforms:
A
B
X
The NOR operation will produce a LOW if any input is HIGH.
+5.0 V
A
The LED will be on when any of B X
C
the four inputs are HIGH. D
17
The XOR Gate
A X A =1 X
B B
18
The XOR Gate
A X A =1 X
B B
Example waveforms:
A
B
X
Notice that the XOR gate will produce a HIGH only when exactly one
input is HIGH.
If the A and B waveforms are both inverted for the above
waveforms, how is the output affected?
19
The XNOR Gate
A X A =1 X
B B
20
The XNOR Gate
A X A =1 X
B B
Example waveforms:
A
B
X
Notice that the XNOR gate will produce a HIGH when both inputs are the
same. This makes it useful for comparison functions.
If the A waveform is inverted but B remains the same, how is
the output affected?
21
Fixed Function Logic
Two major fixed function logic families are TTL and CMOS.
A third technology is BiCMOS, which combines the first
two. Packaging for fixed function logic is shown.
14 13 12 11 10 9 8
1 2 3 4 5 6 7
1 2 3 4 5 6 7
Pin no.1 Lead no.1
identifiers identifier
14
1 14
1
22
Fixed Function Logic
1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7
GND GND GND GND
'00 ' 02 '04 '08
1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7
GND GND GND GND
'10 '11 '20 '21
1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7
GND GND GND GND
'27 '30 '32 '86
23
TTL Logic Family
24
TTL Logic Family
25
Combinational Logic Circuits
Product terms
A
AB
B
C CD
D AB + CD + . . . + JK
Sumofproducts
J
JK
K
Product term
26
Boolean Analysis of Logic Circuits
27
DeMorgan’s Theorem
28
DeMorgan’s Theorem
29
DeMorgan’s Theorem
30
SOP and POS forms
31
Half-Adder
A
A
Cout
B Cout B
32
Full-Adder
Inputs Outputs
Cout Symbol
33
Parallel Adders
Full adders are combined into parallel adders that can add binary
numbers with multiple bits. A 4-bit adder is shown.
A4 B4 A3 B3 A2 B2 A1 B1
C0
C4
C3 C2 C1
The output carry (C4) is not ready until it propagates through all of the
full adders. This is called ripple carry, delaying the addition process.
34
Parallel Adders
The logic symbol for a 4-bit parallel adder is shown. This 4-bit adder
includes a carry in (labeled (C0) and a Carry out (labeled C4).
1 1
Binary 2 2 4-bit
number A 3 3 sum
4 4
1
Binary 2
number B 3
4
Input Output
C0 C4
carry carry
35
Comparators
36
Comparators
COMP
A0 0
A1 A
A2
A3 3
Cascading A>B A>B
A=B A=B Outputs
inputs
A<B A<B
B0 0
B1 A
The IC shown is the
B2
B3 3 4-bit 74LS85.
37
Decoders
A0 A0
A1 X A1 X
A2 A2
A3 A3
Active HIGH decoder for 0011 Active LOW decoder for 0011
38
Decoders
X/Y
0
A specific integrated circuit 1
decoder is the 74HC154 (shown as 2
3
a 4-to-16 decoder). It includes two 4
39
BCD Decoder/Driver
40
BCD Decoder/Driver
41
Encoders
42
Encoders
1 0 1
A0
2 0
1
3 1
A1
4 0
5 0 0
6
0
0 A2
7
8 0 0
A3
0
9
43
Encoders
(16)
This device is offers additional (11)
HPRI/BCD
1
flexibility in that it is a priority (12)
2
(13)
encoder. This means that if more (1)
3
1 (9)
4 (7)
than one input is active, the one Decimal (2)
5
2
(6)
BCD
input (3) 4 output
with the highest order decimal (4)
6
8
(14)
7
digit will be active. (5) 8
(10) 9
(8)
74HC147
The next slide shows an application … GND
44
Encoders
VCC
R7 R8 R9
Keyboard
7 8 9
encoder HPRI/BCD
1
R4 R5 R6 2
3
1
4 2
5 4 BCD complement of
6
4 5 6 7
8 key press
8
9
R1 R2 R3 74HC147
1 2 3
R0
The zero line is not needed by the
0 encoder, but may be used by other
circuits to detect a key press.
45
Multiplexers
46
Demultiplexers
Y
connected as a DEMUX, data is lines A2 2
Data
Y
applied to one of the enable inputs, 3
Y
outputs
and routed to the selected output Enable G1 4
Y
G2A
5
47