You will build logic gates from one gate, the NAND gate, as a factory would.
The idea. A NAND gate gives only when both inputs are . NOT is a NAND gate with its two inputs tied. AND is a NAND gate followed by a NOT. OR is a NOT on each input followed by a NAND gate.
Your tasks.
nand, return the output of a NAND gate for inputs a and b, each or .not_gate, return the NOT of a. Use only nand.and_gate, return a AND b. Use only nand and not_gate.or_gate, return a OR b. Use only nand and not_gate.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…