Re: ALU, negationx, y, add16 off by one?
Posted by cadet1620 on Dec 06, 2011; 5:04pm
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/ALU-negationx-y-add16-off-by-one-tp3564869p3564921.html
There are two types of negation, arithmetic and logical. Read the description of the ALU carefully and make sure you understand what type of negation is required.
Note that just changing the sign bit of a number results in a wildly different number, not the arithmetic negation of the number. Example: 0x0000 (0), 0x8000 (-32768).
--Mark