The NAND gate is the negation of the AND gate and only returns "false", if both input signals are "true". Otherwise the output signal is "true".
I bet that runner A and runner B will not both reach the goal ( = 1), but at least one of them resigns in advance. If both runners reach the goal, I lose. In every other case I will get paid out my winnings.
Claim Z = Runner A and runner B won't both reach the goal.
A | B | Z |
---|---|---|
resigns | resigns | bet won |
resigns | finishes | bet won |
finishes | resigns | bet won |
finishes | finishes | bet lost |
Z = A NAND B
A | B | Z |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Claim: Today it will not both snow and rain.
The weather stays sunshiny the whole day.(true)
It snows. (true)
The initial rain turns into snow. (false)
The NAND gate is a basic module of the circuit logic. Every other circuit can be built from NAND circuits.
For example the AND circuit:
x AND y = (x NAND y) NAND (x NAND y)