Rangkain Kombinasional (Multiplexer Demultiplexer)
Rangkain Kombinasional (Multiplexer Demultiplexer)
Rangkaian
Kombinasional
(Multiplexer & Demultiplexer)
w1
s f
w2
2
A 4-to-1 multiplexer
(B&V: Figure 6.2)
s0
s1
w0 00
s0
w1 01
w2 f w0
10
w3 11 s1
f
s1 s0 f
w2
0 0 w0
0 1 w1
1 0 w2
1 1 w3 w3
3
Implementation
s1
s0
w0 0
w1 1
0
f
1
w2 0
w3 1
4
Synthesis of Logic Functions with Multiplexers
w2
f
(c) Circuit
5
Example: Majority
Function
w1 w2 w3 f
w1 w2 f
0 0 0 0
0 0 0
0 0 1 0 w3
0 1 w2
0 1 0 0 w3 w1
1 0
0 1 1 1 1 1 1
1 0 0 0 0
w3
1 0 1 1 (a) Modified truth f
1 1 0 1 table 1
1 1 1 1 (b) Circuit
6
Example: 3-input XOR
function
w1 w2 w3 f
0 0 0 0
w3
0 0 1 1 w2
0 1 0 1 w1
w3
0 1 1 0 w3
1 0 0 1 f
w3
1 0 1 0
1 1 0 0
w3
1 1 1 1
7
Decoders
• n bits => 2n possible combinations of 1’s and
0’s
• Decoder : asserts ONE out of 2n output signals
to indicate which combination of 1’s and 0’s is
on the input (output is “one hot encoded”)
w0 y0
n
inputs 2n
wn – 1 outputs
y2n – 1
Enable En
8
Decoder Implementation
w0
y0
w1
En w1 w0 y0 y1 y2 y3
1 0 0 1 0 0 0 y1
1 0 1 0 1 0 0
1 1 0 0 0 1 0
1 1 1 0 0 0 1
0 x x 0 0 0 0 y2
y3
En
w0 y0 y4
w1 y1 y5
y2 y6
w2 w0 y0 y3 y7
En
w3 w1 y1
y2
En En y3 w0 y0 y8
w1 y1 y9
y2 y10
En y3 y11
w0 y0 y12
w1 y1 y13
y2 y14
En y3 y15
10
What are they good for?
Example:
m-to-2m decoder
Sel0
0/1 0/1 0/1
Memory
Sel1
0/1 0/1 0/1
a0 Sel2
0/1 0/1 0/1
Address a1
am – 1
Sel2m – 1
0/1 0/1 0/1
Read
Data dn – 1 dn – 2 d0
11
Demultiplexer
• Inverse operation of a Multiplexer: Take 1 input, and
output it to one of m=2n outputs.
• Can implement using a Decoder
w0 y0
n-bit
selec 2n
t wn – 1 outputs
x y2n – 1
En
ys = x
(where s = wn-1wn-2…w0 in binary)
12
Encoders
• Performs the opposite operation of a decoder (!)
• Input = “one hot encoding”
• Output = binary representation of the “index” of the
wire that is “hot” (equal to 1)
w0
y0
2n n
inputs outputs
yn – 1
w2n – 1
13
Encoder Implementation
w0
w3 w2 w1 w0 y1 y0
w1
0 0 0 1 0 0 y0
0 0 1 0 0 1
w2
0 1 0 0 1 0
1 0 0 0 1 1 y1
w3
14
BCD To 7-Segment
w3 w2 w1 w0 a b c d e f g
a a 0 0 0 0 1 1 1 1 1 1 0
0 0 0 1 0 1 1 0 0 0 0
w0 b
c f b 0 0 1 0 1 1 0 1 1 0 1
w1 0 0 1 1 1 1 1 1 0 0 1
w2 d g
e e c 0 1 0 0 0 1 1 0 0 1 1
w3 0 1 0 1 1 0 1 1 0 1 1
f
g d 0 1 1 0 1 0 1 1 1 1 1
0 1 1 1 1 1 1 0 0 0 0
1 0 0 0 1 1 1 1 1 1 1
(a) Code converter (b) 7-segment display 1 0 0 1 1 1 1 1 0 1 1
15