CHIP DMux8Way {
IN in, sel[3];
OUT a, b, c, d, e, f, g, h;
PARTS:
// Put your code here:
DMux4Way(in=in,sel=sel[0…1],a=a1,b=b1,c=c1,d=d1);
DMux4Way(in=in,sel=sel[0…1],a=e1,b=f1,c=g1,d=h1);
Not(in=sel[2],out=nsel2);
And(a=a1,b=nsel2,out=a);
And(a=b1,b=nsel2,out=b);
And(a=c1,b=nsel2,out=c);
And(a=d1,b=nsel2,out=d);
And(a=e1,b=sel[2],out=e);
And(a=f1,b=sel[2],out=f);
And(a=g1,b=sel[2],out=g);
And(a=h1,b=sel[2],out=h);
}