Two-valued logic
logic
(Commonly known as “Boolean algebra”) A mathematical system concerning the two truth values, TRUE and FALSE and the functions AND, OR, NOT. Two-valued logic is one of the cornerstones of logic and is also fundamental in the design of digital electronics and programming languages.
The term “Boolean” is used here with its common meaning – two-valued, though strictly Boolean algebra is more general than this.
Boolean functions are usually represented by truth tables where “0” represents “false” and “1” represents “true”. E.g.:
A | B | A AND B –+—+——– 0 | 0 | 0 0 | 1 | 0 1 | 0 | 0 1 | 1 | 1
This can be given more compactly using “x” to mean “don’t care” (either true or false):
A | B | A AND B –+—+——– 0 | x | 0 x | 0 | 0 1 | 1 | 1
Similarly:
A | NOT A A | B | A OR B –+—— –+—+——– 0 | 1 0 | 0 | 0 1 | 0 x | 1 | 1 1 | x | 1
Other functions such as XOR, NAND, NOR or functions of more than two inputs can be constructed using combinations of AND, OR, and NOT. AND and OR can be constructed from each other 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 NOR or just NAND using the identities:
NOT A = A NOR A A OR B = NOT (A NOR B)
and DeMorgan’s Theorem.
(2003-06-18)
Read Also:
- Two-way
adjective 1. providing for or allowing movement in opposite directions, or both to and from a place: two-way traffic. 2. allowing or entailing communication or exchange between two persons, groups, countries, etc. 3. involving two parties or participants, as a relationship or agreement; two-sided: a two-way race for the nomination. 4. entailing responsibilities, obligations, etc., […]
- Two-way catheter
two-way catheter n. See double-channel catheter.
- Two-way mirror
noun 1. a sheet of glass that can be seen through from one side and is a mirror on the other, used especially for observation of criminal suspects by law-enforcement officials or witnesses. two-way mirror noun 1. a half-silvered sheet of glass that functions as a mirror when viewed from one side but is translucent […]
- Two ways about it
see: no two ways about it
- Two-way street
noun 1. an arrangement or a situation involving reciprocal obligation or mutual action two to tango