gs99 wrote
I have the 3-line solution using Mux16, but I don’t understand how it works.
The Mux16 config:
CHIP Mux16 {
IN a[16], b[16], sel;
OUT out[16];
PARTS:
// Put your code here.
}
I understand how the 16-bit a pin of Mux16 is represented by single letter a (Mux16(a=...
But I don’t understand the sel pin.
Mux16 sel pin is 1-bit; Mux4Way16 sel pin is 2-bit.
How does the Mux16 1-bit sel pin match up with the 2-bit sel pin?
The Mux16s'
sel pins are connected to either
sel[0] or
sel[1]. For each line of the truth table for Mux4Way16, trace through the circuit based on the individual
sel bit values.
--Mark