Login  Register

Re: order of operations in ALU

Posted by culchie on Dec 21, 2010; 11:02pm
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/order-of-operations-in-ALU-tp2127032p2128555.html

The zero is done before the negate.

ie zy is applied before ny as this extract from page 35 says

The zx and nx bits are 0, so the x input is neither zeroed nor negated.
The zy and ny bits are 1, so the y input is first
zeroed, and then negated bit-wise
.
Also if you look at the truth table for the ALU in figure 2.6 (page 37) and at look at the output for the various inputs
you can see that the zeroing must come first