OrionMaster wrote
Hello,
I am having trouble testing the Not gate for Chapter 1. This is my code;
Nand(a=in, out=nota)
When I check the Part Pins it says that out's value is equal to 1 but when testing it, the output is zero. Can some one please help me understand why that is happening?
You need to connect something to the
b input of the Nand. The hardware simulator defaults the value of disconnected inputs to false, so the output of the Nand is always true.
You need to connect something to the
out pin of the Not chip. Because there is nothing connected to
out it value is always false.
Your code says that the output of the Nand gate is connected to an internal wire named
nota that doesn't connect to anything else.
--Mark
[Please delete your duplicated post.]