two-valued logic


two-valued logic

[′tü ¦val·yüd ′läj·ik] (mathematics) A system of logic where each statement has two possible values or states, truth or falsehood.

two-valued logic

(logic)(Commonly known as "Boolean algebra") A mathematicalsystem concerning the two truth values, TRUE and FALSE andthe functions AND, OR, NOT. Two-valued logic is one ofthe cornerstones of logic and is also fundamental in thedesign of digital electronics and programming languages.

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.