Re: Internal buses

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

The example in A.5.3.1shows that you can have more than one "out=" connection for a part's output pin. This is analogous to soldering more than one wire to an output pin in the physical world.

If you need to use every bit of an internal bus individually, you can do something like:
    SomePart16 (..., out=thing,    // 16-bit bus
                      out[0]=thing0,
                      out[1]=thing1,
                      ...
                      out[15]=thing15);

Here's a hint for the ALU. Why did the book have you make an Or8Way? Multiple out= connections make it easy to use.

--Mark