Re-do Mux4Way16.hdl and Mux8Way16.hdl
x1phosura x1phosura@x1phosura.zone
Sun, 28 Nov 2021 19:46:14 -0800
2 files changed,
8 insertions(+),
4 deletions(-)
M
projects/01/Mux4Way16.hdl
→
projects/01/Mux4Way16.hdl
@@ -16,5 +16,7 @@ IN a[16], b[16], c[16], d[16], sel[2];
OUT out[16]; PARTS: - // Put your code here: -}+ Mux16(a=a, b=b, sel=sel[0], out=mux1-out); + Mux16(a=c, b=d, sel=sel[0], out=mux2-out); + Mux16(a=mux1-out, b=mux2-out, sel=sel[1], out=out); +}
M
projects/01/Mux8Way16.hdl
→
projects/01/Mux8Way16.hdl
@@ -18,5 +18,7 @@ sel[3];
OUT out[16]; PARTS: - // Put your code here: -}+ Mux4Way16(a=a, b=b, c=c, d=d, sel=sel[0..1], out=mux1-out); + Mux4Way16(a=e, b=f, c=g, d=h, sel=sel[0..1], out=mux2-out); + Mux16(a=mux1-out, b=mux2-out, sel=sel[2], out=out); +}