Electronic – Using multiple 4 input multiplexers to get an equivalent 16 input multiplexer

multiplexer

Here is my problem:

enter image description here

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.

Best Answer

You simply have to add another level of multiplexers.

enter image description here

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.)