Re: Internal buses

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

"Between two Multi-Bit gates, we don't need to write the whidth of the bus ? "

That is correct.

"And then, between one 16-bits gate and 16 one-bit gate, how do i have to write it ? "

Be sure to read the appendix. But to answer your question, given:

IN a[16], b[16];
        OUT out[16];
       
        PARTS:
        Add16(a=a, b=b, out=addab);
        Not16(in=addab, out=notaddab);
       
        Not(in=?, out=out[0]);
        Not(in=?, out=out[1]);
...

You can access a single bit of a bus using the same array-like notation you used for out.

Not(in=a[0], ...)