Lecture 04
Lecture 04
Disclaimer:
•Most of the contents (if not all) are extracted from resources
available for Digital Fundamentals 10th Edition
S S
A S
A
Cout
B Cout B
Cout
Symbol
PGT104 – Digital Electronics
4
Full-Adder S S 0 Sum
1 A S 1 A S
Example
0 B Cout 0 B Cout 1
Inputs Outputs
A B Cin Cout S
S S 0 Sum
0 0 0 0 0 1 A S 1 A S
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0 0 B Cout 0 B Cout 1
1 0 0 0 1
1 0 1 1 0 1 Cout
1 1 0 1 0
1 1 1 1 1 1
C0
C4
C3 C2 C1
S S S S
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.
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.
A0 COMP A4 COMP
A1 0 A5 0
A2 A A6 A
A3 A7
3 3
A>B A>B A>B A>B
+5.0 V A=B A=B A=B A=B Outputs
A<B A<B A<B A<B
B0 0 B4 0
B1 A B5 A
B2 B6
B3 3 B7 3
A0 A0
A1 X A1 X
A2 A2
A3 A3
Active HIGH decoder for 0011 Active LOW decoder for 0011
A0 = 0
A1 = 1
1
A2 = 0
A3 = 1
All lines are HIGH except for one active output, which
is LOW. The active outputs are 5, 6, 3, and 2 in that
order.
(16)
BCD/7-seg
The a-g outputs are BI/RBO
(4)
BI/RBO
(13)
designed for much (7)
1
a
(12)
b
higher current than most BCD
(1)
2
c
(11)
Outputs
(2)
devices (hence the word inputs
(6)
4
d
(10) to seven
8 (9) segment
driver in the name). (3)
e
(15) device
LT LT f
(5) (14)
RBI RBI g
74LS47 (8)
GND
1 0 0
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
(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
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.
1 1 1 1
0 0
0 MSB 0 MSB
Binary-to-Gray Gray-to-Binary
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
Y2
Y
select A1 1
Y
lines A2 2
Data
Y3
Y
Y4
3
Y
outputs
Enable G1 4
Y
G2A
5
Y5
inputs Y
G2B 6
Y6
Y
7
74LS138 Y7
PGT104 – Digital Electronics
30
Quiz
For the full-adder shown, assume the input bits are as shown
with A = 0, B = 0, Cin = 1. The Sum and Cout will be
a. Sum = 0 Cout = 0
S S Sum
0 A S A S
b. Sum = 0 Cout = 1
0 B Cout B Cout
c. Sum = 1 Cout = 0
1
d. Sum = 1 Cout = 1 Cout
If the data select lines of the MUX are S1S0 = 11, the output
will be
a. LOW MUX
S0 0
Data
b. HIGH select S1
1
c. equal to D0 D0 0 Data
D1 1 output
Data
D 2
d. equal to D3 inputs D2
3 3