two-valued logic
two-valued logic
[′tü ¦val·yüd ′läj·ik]two-valued logic
(logic)The term "Boolean" is used here with its common meaning -two-valued, though strictly Boolean algebra is more generalthan this.
Boolean functions are usually represented by truth tableswhere "0" represents "false" and "1" represents "true". E.g.:
A | B | A AND B--+---+--------0 | 0 | 00 | 1 | 01 | 0 | 01 | 1 | 1
This can be given more compactly using "x" to mean "don'tcare" (either true or false):
A | B | A AND B--+---+--------0 | x | 0x | 0 | 01 | 1 | 1
Similarly:
A | NOT A A | B | A OR B--+------ --+---+--------0 | 1 0 | 0 | 01 | 0 x | 1 | 11 | x | 1
Other functions such as XOR, NAND, NOR or functions ofmore than two inputs can be constructed using combinations ofAND, OR, and NOT. AND and OR can be constructed from eachother using DeMorgan's Theorem:
A OR B = NOT ((NOT A) AND (NOT B))A AND B = NOT ((NOT A) OR (NOT B))
In fact any Boolean function can be constructed using just NORor just NAND using the identities:
NOT A = A NOR AA OR B = NOT (A NOR B)
and DeMorgan's Theorem.