Re: Add16
Posted by
cadet1620 on
Jan 08, 2015; 4:07pm
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Add16-tp4028597p4028610.html
Not sure which part of the message you're referring to.
If the first part, the 32-bit adder, the first Add16c has its carry in bit tied to 0.
If the second part, the Something16 chip is not Addition and is not something that you need to know. I just intended it to show another use of a multi-bit adder with carry-in.
Something16 is a math operation related to addition.
For arithmetic on the Hack computer all numbers need to be considered as signed numbers, so for a = 16 and b = -5
0000 0000 0001 0000 (16)
+ 1111 1111 1111 1011 (-5)
-------------------
0000 0000 0000 1011 (11)
For Something16 with a = 16 and b = -5, because of the Not part before the Add16c and because c = true, the result is
1
0000 0000 0001 0000 (16)
+ 0000 0000 0000 0100 (4)
-------------------
0000 0000 0001 0101 (21)
Something16 is a Sub16 chip.
Sorry for the confusion.
--Mark