ALU zr and ng outputs

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ALU zr and ng outputs

Bill Thackston
I've gotten the ALU-nostat working, but now I'm struggling with the easy part.  I can see that the test for ng should simply be the state of out[15], but when I add this:

Mux(a=true,b=false,sel=out[15],out=ng);

I get a load error for this line, "Can't connect gate's output pin to part"

I could also use a hint about determining the non-zero zr output status.

Thanks,
Bill
Reply | Threaded
Open this post in threaded view
|

Re: ALU zr and ng outputs

cadet1620
Administrator
You don't need any extra parts to generate the 'ng' output.

You can multiple connections to the outputs of parts, so you just need to add the connection to the part where you generate the ALU's 'out'.

See Appendix A.5.3 to see syntax and examples of multiple output connections.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: ALU zr and ng outputs

Bill Thackston
Thanks, I also found that section useful in applying bitwise operations for the zr status.