freak wrote
example 2)not working
Not (in=NANDab,out = x);
Nand (a=a, b=b, out=NANDab);
Look at the header of the And.hdl file:
CHIP And {
IN a, b;
OUT out;
The OUT line names the output pin(s) for the part. In this case there is one output named "out".
"out=x" creates an internal wire named "x". Nowhere in this chip is there any connection to the output pin named "out".
The "out" pin is connected in you working code.
When the simulator's Eval button is permanently disabled, it is usually because one or more chip output s are not connected.
--Mark