Boolean Algebra - Axioms, Theorems and Function Complement
In questa pagina 7
A digital circuit implements a Boolean function; to pick the simplest circuit the expression is manipulated with the rules of Boolean algebra.
What a Boolean algebra is
A Boolean algebra is a set with two operations, logical sum (OR, ) and logical product (AND, ), plus complement (NOT), in which the distributive property, a minimum () and a maximum () and the complement exist. Boole proposed it for logic in the mid 19th century; Claude Shannon (master's thesis, MIT, 1938) showed that signals in a network of two-state switches (open/closed) obey its rules, which is the origin of digital circuit analysis and design.
Here variables take the values and (binary logic). A Boolean function is an expression of variables, constants and AND, OR, NOT. An expression is simplified to use fewer gates (smaller, faster, lower power).
Fundamental identities
Identities come in dual pairs: the second follows from the first by swapping AND with OR and with .
| name | OR form | AND form (dual) |
|---|---|---|
| identity element | ||
| min and max | ||
| idempotence | ||
| complement | ||
| double negation | ||
| commutative | ||
| associative | ||
| distributive |
Example: . Duality law: if an identity holds, so does its dual. Beware: , and hold in Boolean algebra but not in ordinary arithmetic. These rules are the axioms; everything else is deduced from them or checked with a truth table.
De Morgan's theorem
Example: . It extends to more variables: (and not ). General form: to complement an expression, swap AND and OR and negate all variables and constants.
Proof by perfect induction (all value combinations) of :
| 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 |
Simplification theorems
| name | form | proof |
|---|---|---|
| absorption | ||
| absorption (dual) | dual | |
| adjacency | ||
| consensus | below |
Consensus. The term is always covered by one of the other two: if and it is covered by ; if by . Algebraically, multiply by : Dual form: . Consensus turns three products into two: one AND and one OR input saved.
Example. . Check: the only combination giving is .
Complement of a function
The complement has the truth table with and swapped. Two ways to get its expression:
(a) De Morgan. (XOR): (XNOR).
(b) Dual and literal negation. Write the dual (swap AND/OR and ) and negate every literal. Same example: dual , negated literals , as in (a).
gives . Richer: ; dual , negating literals , and the last term is absorbed by : . A 16-row truth table confirms and .
Literals and cost
A literal is each occurrence of a variable, direct or negated: has 2 terms and 4 literals. Two cost criteria for a two-level form:
- number of literals;
- gate input cost: sum of the inputs of all gates (proportional to transistors and connections, more accurate). For a sum of products: inputs of each AND (with at least 2 literals) plus inputs of the final OR.
: two 2-input ANDs and a 2-input OR give inputs (4 literals); inverters, if counted, add one input each. The minimum-cost form is not necessarily unique.
Common mistakes
- Partial De Morgan: .
- Absorption on terms not contained in each other (); (it is ).
- Not checking a long algebraic result with a truth table.
Versione ripasso
- Identities (dual pairs): , ; , ; , ; , ; ; commutative, associative; distributive and .
- Duality: swap AND/OR and . The second distributive law holds in Boolean algebra, not in ordinary arithmetic.
- De Morgan: , ; extended: . Proved by perfect induction. Makes NAND and NOR universal (Logic Gates, Gate Delay and Universal GatesAND, OR, NOT implement the Boolean operations; NAND, NOR, XOR and XNOR derive from them. Every function is described by a truth table with 2^n rows. Multi-input XOR is the odd-parity function. An ideal gate has zero delay; a real gate has a propagation delay t_G (different for 0 to 1 and 1 to 0), so the output changes t_G after the input. NAND and NOR are each universal.Logic Gates, Gate Delay and Universal Gates →).
- Simplification: absorption , ; adjacency ; consensus (multiply by ), dual .
- Example: .
- Complement: (a) De Morgan, (b) dual then negate literals. ; ; .
- Cost: literals, or gate inputs (SOP: AND inputs plus OR inputs). : 4 literals, inputs.
- Mistakes: partial De Morgan; absorption on non-contained terms; ; no truth-table check.