The Mighty Multiplexer

Another vital piece of our puzzle is a way to select among choices of input. The multiplexer (or mux) is a little part, that despite its big name, has a simple design.

If we have two inputs, A and B, we can chose whichever one we want using AND gates. Below if only S1 is on, then X = B, but if only S0 is on, X = A.

Now because we want either S1 or S0 on, but not both on nor both off, we can use a NOT gate to make S0 always the opposite S1. Now we have just one input, called S.

When S is off (0), then X=A, and when S is on (1), X=B. And we can draw this like the following. (The tiny numbers show us which input is used for each value of S.)

Making it bigger

Using that same idea, we can create a multiplexer for any number of inputs. Below is the design for a 4 input mux. Only one of the AND gates could be on for any combination of S1 and S0. (Remember: Overlapping wires are connected only if they have a dot.)

So when S1 and S0 are 00 (respectively), then X=A, if they are 01, X=B, if 10, X=C, and 11 makes X=D. Below is how we would draw a 4-input mux.

There we have it. Multiplexers give us the power to decide what data to use, and which to ignore.

Next Up: Shifters »