insan-e wrote
// Implementation: the ALU logic manipulates the x and y inputs
// and operates on the resulting values, as follows:
// if (zx == 1) set x = 0 // 16-bit constant
// if (nx == 1) set x = !x // bitwise not
It is not clear to me should the second operation (bitwise not) depend on previous value of x or the first one.
This is a program-like description of the ALU. If
x was a variable, the first "if" will replace the value of
x, so the second "if" will affect the new value of
x.
If
zx =
nx = 1, then
x = ! 0. (0xFFFF or -1.)
--Mark