Reputation: 325
As above, can you please include a diagram or an image and explain me the reason of this design? thank you in advance.
Upvotes: 0
Views: 4711
Reputation: 11322
A 2 to 4 Demultiplexer routes one input IN
to one of four outputs (OUT0
, OUT1
, OUT2
, OUT3
).
(picture from http://www.play-hookey.com/digital/combinational/decoder_demux_four.html)
The selection of the active output is done via two selection inputs A
and B
.
To implement a two-input XOR
, you can set the multiplexer data input to constant 1
. Then feed OUT1
and OUT2
to a two-input OR
. OUT1
and OUT2
are active, if the selection inputs are different (one input 0
and one input 1
).
For a two-input XNOR
, outputs OUT0
and OUT3
are fed to the OR
gate. Outputs OUT0
and OUT3
are active if both selection inputs are equal (both 0
or both 1
).
Upvotes: 1