I'm having trouble writing a script that implements the Not gate from the Nand gate. I understand it conceptually and I can even draw the circuit on paper, but somehow I can't get working code. So far I've read the first chapter of the book, the hardware survival kit, and even the lecture slides, comparing my code to working code whenever I get the chance.
I've tried several different codes, the latest of which is this:
CHIP MyNot {
IN a;
OUT out;
PARTS:
Nand (a = a, out = out);
}
Again, this isn't the only thing I've tried. When I load this script into the Hardware simulator, it returns a value of "1" for inputs "1" and "0".
That did the trick ! The problem of having a dangling input was one I anticipated but didn't know how to solve, and the graphic representations of circuits did little to help. I appreciate it!