Login  Register

Re: ALU idk whats wrong

Posted by cadet1620 on Jun 20, 2011; 9:37pm
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/ALU-idk-whats-wrong-tp3087773p3088302.html

"Negate" is confusing you; it can mean either arithmetic or logical negation.  Careful examination of the operation table (fig. 2.6) will lead you to the type of negation you need.

If you didn't already do so, you can replace all the 0s and 1s under zr and ng in the ALU.cmp file with * so that you don't need to worry about the status bits while getting the basic operations working.  Be sure to save the original file for final testing.

--Mark

[Once you get your ALU working, please edit your post to remove the majority of the HDL; we like people to come up with the general structure on their own.]