Now that we’ve completed our
NAND_gate(), we can use that function to build other gates.
This time you’re starting from scratch, so lean on that truth table. Fortunately, our next gate, NOT only has one input.
Here’s the truth table:
NOT_gate() which takes one input
a and returns the outputs specified in the truth table.
You can do this using if/else statements, like with the last gate. But, if you want to challenge yourself, you can use
NAND_gate() inside your