If sel = false, then out should contain the lower 4-bits of in (i.e. in[0], in[1], in[2], in[3])
If sel = true, then out should contain the upper 4-bits of in (i.e. in[4], in[5], in[6], in[7])
Here is my code and how to modify it....?
CHIP NewMux
{
IN in[8], sel;
OUT out[4];
PARTS:
Mux4(sel=sel, a=in[0], b=false, out=out[0]);
Mux4(sel=sel, a=in[1], b=false, out=out[1]);
Mux4(sel=sel, a=in[2], b=false, out=out[2]);
Mux4(sel=sel, a=in[3], b=false, out=out[3]);
Mux4(sel=sel, a=in[4], b=true, out=out[0]);
Mux4(sel=sel, a=in[5], b=true, out=out[1]);
Mux4(sel=sel, a=in[6], b=true, out=out[2]);
Mux4(sel=sel, a=in[7], b=true, out=out[3]);
}