Re: Internal buses

Posted by Polo on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Internal-buses-tp4026592p4026594.html

Ok thanks,

you mean .... like that :

CHIP test {
        IN a[16], b[16];
        OUT out[16];
       
        PARTS:
        Add16(a=a, b=b, out=addab);
        Not16(in=addab, out=notaddab);
       
        Not(in=notaddab[0], out=out[0]);
        Not(in=notaddab[1], out=out[1]);
        Not(in=notaddab[2], out=out[2]);
        Not(in=notaddab[3], out=out[3]);
        Not(in=notaddab[4], out=out[4]);
        Not(in=notaddab[5], out=out[5]);
        Not(in=notaddab[6], out=out[6]);
        Not(in=notaddab[7], out=out[7]);
        Not(in=notaddab[8], out=out[8]);
        Not(in=notaddab[9], out=out[9]);
        Not(in=notaddab[10], out=out[10]);
        Not(in=notaddab[11], out=out[11]);
        Not(in=notaddab[12], out=out[12]);
        Not(in=notaddab[13], out=out[13]);
        Not(in=notaddab[14], out=out[14]);
        Not(in=notaddab[15], out=out[15]);
       
}

When i write this and try to load it in the Hardware simulator, the software load the following error message : "sub bus of an internal node may not be used"