Understanding Mux and Dmux

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Understanding Mux and Dmux

Lindy
Would someone help me a bit understanding the function of mux and demux?  I understand how it works, but I don't get how it is used.  I was going to wait until that chapter when I need it and figure it out then.  

I've build the Mux, but not yet the demux.  I was going to do the 4way, 8way, but they seem to require that I understand how they will be used.  There is a lot of stuff on the net to read about mux'es but I haven't figured how any of what I've read so far relates to this project.

Any help would be appreciated.
Thanks!
Lindy
Reply | Threaded
Open this post in threaded view
|

Re: Understanding Mux and Dmux

cadet1620
Administrator
Would someone help me a bit understanding the function of mux and demux?  I understand how it works, but I don't get how it is used.  I was going to wait until that chapter when I need it and figure it out then.
Muxes are also called selectors because a common usage is to select between alternative signals.
Demuxes are also called distributors because they can distribute a control signal to one of several locations.

For example (not from Hack) a CPU need to select which of 4 registers to route to the ALU inputs based on bit fields in the current CPU instruction and where to store the result based on another bit field. Out mythical CPU's instruction include the bit fields ...xxyydddw... where xx and yy select the source registers, ddd selects the destination. The w bit controls whether the instruction writes to the destination register. (Sometimes you want to just do a compution and test the result, compare instruction for example.)

Mythical ALU showing mux and dmux usage
Color marks the active paths if the instruction has x=3, y=0, d=2, w=1.

--Mark