Re: ALU Implementation - the road traveled thus far
Posted by
WBahn on
Jun 07, 2019; 8:53pm
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/ALU-Implementation-the-road-traveled-thus-far-tp4033278p4033295.html
ouverson wrote
I see that it's Add and not Or. I'm so used to the "+" being used for Or that it got me. I'll swap the Or16 for an Add16. Thanks.
I figured that was where the confusion came from -- it's an easy mistake to make.
Having said that -- I would STRONGLY recommend walking though at least a good portion of that table and, by hand, working out how your ALU actually performs the operations described. In particular, how does it perform subtraction. The first step is just to verify that it DOES perform subtraction even if you don't grasp HOW it does it. There are other ones like x+1 or even just -x and 1 that should seem counter-intuitive when you think of what the control signals do on the surface.