dmoeller wrote
Mux16 (a=out, b=Not(in=out, out=notOut), sel=no, out=NotOut);
HDL is not a programming language. The parts are not "functions" that return values.
HDL is a description of a wiring diagram. You need to write each part individually and the wires that connect the parts all need to have names.
Your 'no' handling need to be something like
Somepart (..., out=fnOut);
Not (in=fnOut, out=NotFnOut);
Mux16(a=fnOut, b=notFnOut, sel=no, out=out, out=..., out=..., ...);
HDL does not allow connections from outputs named in the OUTPUT line to internal parts. The extra out= connections let you make signals that you need to generate the zr and ng outputs.
--Mark