In daily language and mathematical articles, we frequently use the four basic logical operations: "not", "and", "or", "if-then". However, in electronics, the most fundamental logical operation is "nand" -- the NAND ("not and") operation can be used to implement other logical operations.
The symbol for NAND gate.
From NAND we can construct the four basic logical operations, which are the building blocks of the symbolic logic:
- Negation: Not p. p¬pTFFT By comparing its truth table with the truth table of p|p, we see that ¬p=p|p.
- Conjunction: p and q. pqp∧qTTTTFFFTFFFF The output is true only if both p and q are true. It turns out that p∧q=(p|q)|(p|q). Note also that p|q=¬(p∧q), i.e. "p NAND q" is indeed "Not (p AND q)".
- Disjunction: p or q. pqp∨qTTTTFTFTTFFF The output is false only if both p and q are false. It turns out that p∨q=(p|p)|(q|q).
- Conditional: If p then q. pqp→qTTTTFFFTTFFT The output is false only if p is true but q is false. It turns out that p→q=p|(q|q).
No comments:
Post a Comment