# Using multiple 4 input multiplexers to get an equivalent 16 input multiplexer

Here is my problem:

pretend each of the multiplexers are hooked up to the corresponding bit of each Byte. The first multiplexer is hooked up to the first bit of each of the Bytes (0 - 3). The second multiplexer is hooked up to the second bit of each Byte (0 - 3) and so on. My problem is, is that i don't have 16 input multiplexers. How can i take 4 input multiplexers and get an equivalent 16 input multiplexer?

edit (by Steven)
Given the comments and the three downvotes it seems that the diagram isn't clear for everybody. At the right you have an array of 16 bytes (ignore "program instructions"). John wants a way to multiplex all of the 16 LSBs to one output, all of the next LSBs to a second output, and so on, for all 8 bits. That's the 8 blocks on the left, 8 muxes. They only show 4 inputs and 2 select lines, because John's problem is that he can't find a 16-input mux. HTH.

-
This makes absolutely no sense. I suspect that the underlying problem is you don't understant what a processor does. I can't even imagine how you think a command line processor has anything to do with a hardware multiplexer. You are envisioning some architecture, but without understanding how computers work, and expecting us to see what's in your head. –  Olin Lathrop May 29 '12 at 23:02
@OlinLathrop, I have reopened this after an edit has been performed.I believe it is more clear now but others can disagree and let me know. –  Kortuk May 30 '12 at 4:44
Still nonsense, as far as I can tell. –  The Photon May 30 '12 at 5:02
@ThePhoton - I seem to understand it, and I know I'm a bit slow at times :-) –  stevenvh May 30 '12 at 5:33
@stevenvh, you seem to have figured out what he wanted, but as presented the question is still nonsense. Why are some of the lines on the left labelled "in" and some "out"? How does a 16:1 mux feed a 16 byte memory? What do "program instructions" have to do with it? –  The Photon May 30 '12 at 16:09

You simply have to add another level of multiplexers.

What you have now is the left part of this circuit: 4 times four inputs, giving 4 outputs. Use a fifth multiplexer to select one of those outputs. Since you have 16 inputs you need 4 select lines (2$^4$ = 16). That's the A, C, D and E lines. Note that the four muxes at the left use the same select lines.

If you want to select the input the arrow points to you'll have to set D = 1, E = 1, and for the right mux A = 0 and C = 1.

The 74HC153 is a dual 4-to-1 multiplexer.

edit
Supercat's tri-state buffers are an excellent idea (don't forget to upvote), and it came to me naturally when I was writing the edit to OP. The multiplexer solution needs a few more parts, but can be implemented in a CPLD, I'm not sure if they support tri-state logic internally. (They do for I/O.)

-
Thank you! thats exactly what i was looking for! –  John May 30 '12 at 5:26
@John - Glad to be of help :-) –  stevenvh May 30 '12 at 5:30