Login  Register

Re: Figuring out zr

Posted by cadet1620 on Oct 25, 2012; 2:16am
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Figuring-out-zr-tp2326310p4025415.html

Eric M wrote
The problem is that the solution described below does not work:
Or8Way(in=outValue[0..7], out=firstPartOr);
Or8Way(in=outValue[8..15], out=secondPartOr);
Or(a=firstPartOr, b=secondPartOr, out=orOut);
Not(in=orOut, out=zr);

I keep getting a sub-bussing error.

Sub bus of an internal node may not be used.
You must create the 8-bit buses from a chip output:
     Something16(... out[0..7]=lowBits, out[8..15]=highBits, ...);
Study the example in A.5.3.

--Mark