DMux4Way Error

Posted by flaviorcb on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/DMux4Way-Error-tp4025116.html

Hi,

Why my code is wrong?
I can't get the point.

Sorry my poor english, I'm brazilian.

thanks.

CHIP DMux4Way {
    IN in, sel[2];

    OUT a, b, c, d;

    PARTS:
    // Put your code here.
        Not(in=sel[0],out=notsel0);
        Not(in=sel[1],out=notsel1);
       
        And(a=notsel0,b=notsel1,out=temp1);
        And(a=temp1,b=in,out=a);
       
        And(a=notsel0,b=sel[1],out=temp2);
        And(a=temp2,b=in,out=b);
       
        And(a=sel[0],b=notsel1,out=temp3);
        And(a=temp3,b=in,out=c);
       
        And(a=sel[0],b=sel[1],out=temp4);
        And(a=temp4,b=in,out=d);
}