chap5
chap5
Instructor:
Dr. Abdul-Halim Jallad
Outline
• Gate Delay
• Decoders
• Encoders
• Multiplexers
• Demultiplexers
5–2
ELEC 335, Digital Logic Design, UAE University
CLOs Covered
1. Manipulate number system, binary codes, and computer
arithmetic. [PLO-1]
2. Apply Boolean algebra and Karnaugh map minimization
techniques to simplify Boolean expressions. [PLO-1]
3. Design binary adders, decoders, encoders, multiplexers, and de-
multiplexers to implement combinational logic circuits. [PLO-1, 2]
4. Design with flip-flops, synchronous and asynchronous sequential
circuits, state diagrams, and state tables. [PLO-1, 2]
5. Design registers (serial, parallel, and shift) ripple counters, and
synchronous counters. [PLO-1, 2]
6. Design digital circuits with memory devices of ROMs, PLAs, &
PALs. [PLO-2, 4]
5–5
ELEC 335, Digital Logic Design, UAE University
Combinational Logic Building
Blocks
• Decoders:
– Binary n-to-2n decoders.
– Implementing functions using
decoders.
• Encoders:
– 2n -to-n binary decoders.
• Multiplexers.
• DeMultiplexers.
5–6
ELEC 335, Digital Logic Design, UAE University
Decoders
A decoder is a logic circuit that detects the presence of a specific
combination of bits at its input. Two simple decoders that detect the
presence of the binary code 0011 are shown. The first has an active
HIGH output; the second has an active LOW output.
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
F2 = XY'
• From truth table, circuit
for 2x4 decoder is: F3 = XY
1
0A
0
0B
1
1
1 A
11
0 B 1
11
1 10
1
11
1 0 E
A
B
F6 = xyz'
F0
F1 F7 = xyz
X
Y
3-to-8 F2
F3
Z
Decoder F4
F5
F6
x y z
F7
inputs. 11
12
13
14
CS1 & 15
CS2 EN
74HC154
Output 0
A0 2x4 Output 1
A1 decoder Output 2
E Output 3
A2
Output 4
2x4 Output 5
decoder Output 6
E
Output 7
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
designed for much (7)
1
a
(13)
(12)
higher current than most BCD
(1)
2
b
(11)
Outputs
(2) c
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
A A B
B
A B X
A B
A B
1
5–23E ELEC 335, Digital Logic Design, UAE University
A complete design procedure
x y z C S
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) 1
HPRI/BCD
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.
… Inputs
I0
Input 0 I1
I2 mux Y
Input 1
. MUX Output I3
. S1 S0
Input 2n-1 select
I0 I1 I2 I3 S1 S0 Y S1 S0 Y
d0 d1 d2 d3 0 0 d0 0 0 I0
4-to-1 MUX d0 d1 d2 d3 0 1 d1 0 1 I1
Truth Table d0 d1 d2 d3 1 0 d2 1 0 I2
d0 d1 d2 d3 1 1 d3 1 1 I3
Y
connected as a DEMUX, data is lines A2 2
Data
Y
applied to one of the enable inputs, Y
3
outputs
and routed to the selected output Enable G1 4
Y
G2A
5
1 0
0 0
S1 S0
1101 0
1 4-x-1
10 00 2 Mux
3
Y
D1
D2
S1 S0 Y
D3
0 0 D0
0 1 D1
1 0 D2
5–35 ELEC 335, Digital Logic Design, UAE University
1 1 D3
Multiplexers
• Larger multiplexers can be constructed from smaller ones.
• An 8-to-1 multiplexer can be constructed from smaller
multiplexers as shown:
I0
S2 S1 S0 Y I1 4:1
0 0 0 I0 I2 MUX
0 0 1 I1 I3
0 1 0 I2 2:1
0 1 1 I3 S1 S0 MUX Y
1 0 0 I4 I4
1 0 1 I5 I5 4:1
1 1 0 I6 I6 MUX S2
1 1 1 I7 I7
S1 S0
D
Outputs
Y0 = D.S1'.S0'
Y1 = D.S1'.S0
Data D demux
Y2 = D.S1.S0'
Y3 = D.S1.S0
S1 S0
select
Y2
Y
select A1 1
lines A2
Y
2
Data
Y3
Y
Y4
3
Y outputs
Enable G1 4
G2A
Y
5
Y5
inputs Y
G2B 6
Y6
Y
7
74LS138 Y7
ELEC 335, Digital Logic Design, UAE University
Mux-Demux Application Example
?
A1 X
b. an OR gate
A2
c. a NAND gate
A3
d. a NOR gate
?
A1 X
b. an OR gate
A2
c. a NAND gate
A3
d. a NOR gate