There's Mux4Way functional table:
I have already know right way for implementation of this chip by using another 3 Multiplexor chips when mux functions as following:
/** * Multiplexor: * out = a if sel == 0 * b otherwise */
Let's say we have already build Muxtiplexor chips, to build working 4 way mux we would have something like that in HDL:
// First selection bit Mux(a=D0, b=D1, sel=sel, out=mux0); Mux(a=D2, b=D3, sel=sel, out=mux1); // Second selection bit Mux(a=mux0, b=mux1, sel=sel, out=out);
And it's working! But I've no idea why! So, in such particular way it behaves as expected but all my tries to build truth table was with no success.
It would be great to have any idea how to prove why this particular way is correct and even why it is working.