Re: using internal node as a select line
Posted by nasserAlhouti on Mar 10, 2019; 5:47am
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/using-internal-node-as-a-select-line-tp4033017p4033019.html
// if (f == 1) set out = x + y // integer 2's complement addition
reading this I thought we would have to do all the operations
i.e if (zx == 1) set x = 0 , // if (nx == 1) set x = !x
then once we preform the addition operation after either setting the bits to zero or negating it or both then if the most significant bit of x is 1 x[15] = 1 that would mean it is a negative number so we would negate all the bits and increment it by one which was why I wanted to use that bit as my select line if (x[15] == 1) then negate it and increment it by one.Otherwise, just output x and use the add16 chip to to the addition of bits, am I overthinking this ??