A mux is a black box which takes multiple inputs and lets you
control which of those inputs you want to be the output. A n-bit mux
takes as its inputs n real input bits and log2(n) additional selection
bits. Out of the mux comes one of the input bits, and its value at any
point in time corresponds to the value of the input designated by the
selection bits.
Here's a 4-bit mux. It has two selection bits and one output bit.
Most pieces of equipment I can think of that use mux technology
actualy use demuxes. A demux is the opposite of a mux. It takes one
input and sends it off to one of n places. Here's a four-bit demux.
If selector0 is 0 and selector1 is 1, then the sole input bit will
go to output01, and all the other outputs will be left alone.
My four-track is basically a tape recorder, some mixer stuff, and two demuxes:
The "A/B box" you buy to connect two printers or two monitors to
the same computer (but only one at a time) is also a demux:
If you care about truth tables, here's a truth table for a two-bit mux.
You can chain muxes and demuxes to ridiculous extents, and in doing so sink into a delusion
that your muxes and demuxes form a system of aqueducts and that you are a Sumerian
tyrant who controls the flow of water throughout your
land. Be careful!
Sun May 05 2002 11:38:
As long as I'm drawing block diagrams, I'll explain the mux and
demux here.
+---+
input00->|MUX|-->output0
input01->| |
input10->| |
input11->| |
+---+
selector0-^ ^-selector1
If selector0 is 1 and selector1 is 0, then the mux will tie input10 to
output0.
+---+
input0-->|DE |-->output00
|MUX|-->output01
| |-->output10
| |-->output11
+---+
selector0-^ ^-selector1
+---+
Mic-->| |-->Track 1
| |-->Track 3
+---+
^-Track selector
+---+
Guitar-->| |-->Track 2
(or other| |-->Track 4
input) +---+
^-Track selector
+---+
Computer->| |->Printer1
| |->Printer2
+---+
^-A/B switch
In0 In1 Sel | Out
------------+----
0 0 0 | 0
0 0 1 | 0
0 1 0 | 0
0 1 1 | 1
1 0 0 | 1
1 0 1 | 0
1 1 0 | 1
1 1 1 | 1
