Professional Documents
Culture Documents
ECE 331 - Digital System Design: Multiplexers and Demultiplexers, and Encoders and Decoders
ECE 331 - Digital System Design: Multiplexers and Demultiplexers, and Encoders and Decoders
Material to be covered
Supplemental
Chapter 9: Sections 1 4
Fall 2010
Multiplexers
Fall 2010
Multiplexers
A multiplexer has
N control inputs
2N data inputs
1 output
Fall 2010
Multiplexers
Data
inputs
Control
input
Fall 2010
Z = A.I0 + A.I1
ECE 331 - Digital System Design
Multiplexers
MSB
I0
I1
I2
I3
LSB
Multiplexers
MSB
I0
I1
I2
I3
I4
I5
I6
I7
LSB
Multiplexers
Fall 2010
Fall 2010
Fall 2010
10
Multiplexers
Exercise:
Design an 8-to-1 multiplexer using
4-to-1 and 2-to-1 multiplexers only.
Fall 2010
11
Multiplexers
Exercise:
Design a 16-to-1 multiplexer using
4-to-1 multiplexers only.
Fall 2010
12
Multiplexer (Bus)
Fall 2010
13
Demultiplexers
Fall 2010
14
Demultiplexers
A demultiplexer has
N control inputs
1 data input
2N outputs
Fall 2010
15
Demultiplexers
Out0
Out1
In
Out2
Out3
S1 S0
W
X
Y
Z
W = A'.B'.I
X = A.B'.I
Y = A'.B.I
Z = A.B.I
A B
Fall 2010
16
Decoders
Fall 2010
17
Decoders
A decoder has
N inputs
2N outputs
Fall 2010
18
Decoders
Out0
I0
Out1
I1
Out2
Out3
msb
W = A'.B'
W
X
Y
Z
X = A.B'
Y = A'.B
Z = A.B
Active-high outputs
Fall 2010
19
Decoders
Out0
I0
Out1
I1
Out2
Out3
msb
W = (A'.B')'
W
X
Y
Z
X = (A.B')'
Y = (A'.B)'
Z = (A.B)'
Active-low outputs
Fall 2010
20
Decoders
msb
Fall 2010
21
Fall 2010
22
Fall 2010
23
Out3
W
X
Y
Z
high-level
enable
enabled
disabled
Fall 2010
I0
I1
Out0
Out1
Out2
Enable
En
En
24
Out3
W
X
Y
Z
low-level
enable
enabled
disabled
Fall 2010
I0
I1
Out0
Out1
Out2
Enable
En
En
25
Fall 2010
26
Decoders
Exercise:
Design a 4-to-16 decoder using
2-to-4 decoders only.
Fall 2010
27
Encoders
Fall 2010
28
Encoders
An encoder has
2N inputs
N outputs
Fall 2010
29
Encoders
Fall 2010
I0
I1
I2
I3
Out0
Out1
Z
Y
30
Priority Encoders
d=0
Output is valid when at least one input is active
d=1
Why is the valid indicator needed?
Fall 2010
31
Priority Encoders
msb
Valid bit
Fall 2010
32
4 input bits
: IN STD_LOGIC_VECTOR(3 DOWNTO 0) ;
: OUT
STD_LOGIC_VECTOR(1 DOWNTO 0) ;
: OUT
STD_LOGIC ) ;
valid indicator
2 output bits
Active-high
inputs and outputs
33
Fall 2010
34
Fall 2010
35
Example:
Using an 8-to-1 multiplexer, design a logic circuit
to realize the following Boolean function
F(A,B,C) = m(2, 3, 5, 6, 7)
Fall 2010
36
Example:
Using an 8-to-1 multiplexer, design a logic circuit
to realize the following Boolean function
F(A,B,C) = m(1, 2, 4)
Fall 2010
37
Group the rows of the truth table, for the function, into
(n / 2) pairs of rows.
Fall 2010
38
Fall 2010
39
Fall 2010
40
Fall 2010
41
Fall 2010
42
Fall 2010
43
Example:
Using a 3-to-8 decoder, design a logic circuit to
realize the following Boolean function
F(A,B,C) = m(2, 3, 5, 6, 7)
Fall 2010
44
Example:
Using two 2-to-4 decoders, design a logic circuit
to realize the following Boolean function
F(A,B,C) = m(0, 1, 4, 6, 7)
Fall 2010
45
Questions?
Fall 2010
46