EEE303-Week06 - Mux Demux
EEE303-Week06 - Mux Demux
n m
n-to-1 multiplexer
n 1
f =s w 0 +s w1
𝑓 =𝑠 1 𝑠0 𝑤0 + 𝑠1 𝑠 0 𝑤1+ 𝑠 1 𝑠0 𝑤2 + 𝑠1 𝑠 0 𝑤 3
In this case the En input serves as the data input for the demultiplexer, and the y0 to y3 outputs are
the data outputs. The valuation of w1 w0 determines which of the outputs is set to the value of En.
XOR
x y f x y f
0 0 0 0 0 0
0 1 0 0 1 1
1 0 0 1 0 1
1 1 1 1 1 1
xy xy
0 0
0 f 1 f
0 1
1 1
EEE 303 – Digital Electronics Dr. Sajid Muhaimin Choudhury 12
Department of EEE, BUET
Implementing Logic Functions with MUX: Smart Way
XOR
x y f x y f
0 0 0 0 0 0
0 1 0 0 1 1
1 0 0 1 0 1
1 1 1 1 1 1
x x
0 y
f f
y 1
f=0
f = w3
f = w3
f=1
w1
w2
w3 f
f = w2 ⊕ w3
EEE 303 – Digital Electronics Dr. Sajid Muhaimin Choudhury 18
Department of EEE, BUET
3-Input XOR using 4-to-1 Mux
f = w3
f=
f=
f = w3
𝐹 =𝑥 . 𝐹 𝑥 + 𝑥 𝐹 𝑥
¿
=
=
May have i/p and o/p ports which are used to make external connections to the
module (these are not the i/p and o/p ports of the module)
compiler essentially inserts the body of the function at each place where it is called
303
Lecture 06.2
Dr. Sajid Muhaimin Choudhury, Assistant Professor
Department of Electrical and Electronics Engineering
Bangladesh University of Engineering and Technology
Decoder
Decoder circuits are used to decode encoded information.
A binary decoder is a logic circuit with n inputs and 2𝑛 outputs.
An n-bit binary code in which exactly one of the bits is set to 1 at a
time is referred to as one-hot encoded
The outputs of a binary decoder are one-hot encoded.
¿ ∏ 𝑀(2,5)
Encoder
56