Re: ALU - Don't know where to start
Posted by
cadet1620 on
Feb 13, 2013; 6:17pm
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/ALU-Don-t-know-where-to-start-tp4026279p4026285.html
Technik wrote
What exactly are ng and zr and what purpose do they serve? The rest make sense (zx = zero X; ny = negate y, etc) but I'm not sure I understand what the "status" bits are.
The status bits give information about the numerical value of the ALU's output. If the output is 0, then
zr is true. If the output is a negative number, then
ng is true. If the output is a positive number, both status bits are false.
The status bits will be used in project 5 to implement conditional jumps in the CPU.
--Mark