Can't get started Nand out all ways 1

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

Can't get started Nand out all ways 1

schrodin
I might be ridiculous but I have tried going through the FAQ and docs but nothing is working for me. I was trying to work on the very first problem in the very first project creating a not gate, but something isn't working now I am just trying to get a correct truth table for the built in Nand gate. Here is my hdl. I think it is ok to post here because it is not correct logic for anything but Nand.

CHIP Not {
    IN in1, in2;
    OUT testyOut;

    PARTS:
    Nand( a=in1, b=in2, out=testyOut);
   
}

testOut is all ways 1.
Reply | Threaded
Open this post in threaded view
|

Re: Can't get started Nand out all ways 1

cadet1620
Administrator
schrodin wrote
CHIP Not {
    IN in1, in2;
    OUT testyOut;

    PARTS:
    Nand( a=in1, b=in2, out=testyOut);
   
}
Don't ever change the IN and OUT lines. They define the interface to the chip and must use the same names as the provided prototype files.

You've got the right idea, that you need to use a Nand gate to make Not.  Since Nand has inputs 'a' and 'b' and output 'out', your Not will look like this:
CHIP Not {
    IN in;
    OUT out;

    PARTS:
    	Nand( a=___, b=___, out=out);
}
You just need to fill in the blanks.  Read The Hardware Construction Survival Kit and Appendix A.

You'll learn that the only valid things for those blanks are the names of chip inputs, "false", "true", and the names of internal pins (wires and buses).  You won't have any internal pins in the Not chip.

--Mark