Skip to content
DLVSDigital Logic Visualizing System

Logic Lab

Boolean Algebra

Huntington postulates and theorems, each verified by truth table, plus duality, operator precedence, complement and De Morgan as gates.

Dual and complement

F (XOR expanded)A·B + A′·C
Dual Fᵈ (swap · and +, 0 and 1)(A + B)·(A′ + C)
Complement F′ (De Morgan)(A′ + B′)·(A + C′)

✓ F′ is the opposite of F on every row.
✓ Fᵈ(A, B, …) equals [F(A′, B′, …)]′, the defining property of the dual.

The dual only swaps the operators and the constants; the variables stay as they are. The complement also inverts every variable. A true statement stays true when you take its dual, which is why each law below comes as a pair.

Operator precedence

1
Parentheses ( )

Anything inside brackets is worked out first.

2
NOT (′ or bar)

Applies to the single variable or bracket just before it.

3
AND ( · or AB )

Binds tighter than OR, like × before + in arithmetic.

4
XOR ( ⊕ )

This tool puts XOR between AND and OR. Many books group it with OR, so use brackets to be safe.

5
OR ( + )

Evaluated last.

Fully bracketedA + (B · C′)
Order of evaluation
  1. C′
  2. B·C′
  3. A + B·C′

Precedence decides which operator acts first when there are no brackets. The bracketed form and the evaluation order are produced by the same parser the other tabs use, so what you see is what they compute.

Axiomatic definition: Huntington postulates

A Boolean algebra is a set B with two operators, + and ·, that obey the postulates below. Switching algebra is the case B = {0, 1}. Each postulate is checked by trying every value of 0 and 1.

Closure

✓a + b and a·b are always in B

Identity

✓a + 0 = a and a·1 = a

Commutative

✓a + b = b + a and a·b = b·a

Distributive

✓a·(b + c) = a·b + a·c and a + b·c = (a + b)·(a + c)

Complement

✓every a has a′ with a + a′ = 1 and a·a′ = 0

Two elements

✓B has at least two different elements, 0 ≠ 1

Postulates and theorems

Identity

✓A + 0 = A

✓A·1 = Adual

Null (dominance)

✓A + 1 = 1

✓A·0 = 0dual

Idempotent

✓A + A = A

✓A·A = Adual

Complement

✓A + A′ = 1

✓A·A′ = 0dual

Involution

✓(A′)′ = A

Self-dual: no separate dual form.
Commutative

✓A + B = B + A

✓A·B = B·Adual

Associative

✓(A + B) + C = A + (B + C)

✓(A·B)·C = A·(B·C)dual

Distributive

✓A·(B + C) = A·B + A·C

✓A + B·C = (A + B)·(A + C)dual

Absorption

✓A + A·B = A

✓A·(A + B) = Adual

Redundancy

✓A + A′·B = A + B

✓A·(A′ + B) = A·Bdual

De Morgan

✓(A + B)′ = A′·B′

✓(A·B)′ = A′ + B′dual

Consensus

✓A·B + A′·C + B·C = A·B + A′·C

✓(A + B)(A′ + C)(B + C) = (A + B)(A′ + C)dual

De Morgan’s theorem as gates

AB
0A0BNAND=1A′+B′=1NOR=1A′·B′=1

NAND gives the same output as an OR gate with inverted inputs, and NOR gives the same output as an AND gate with inverted inputs. Try all four input pairs: each equal pair of outputs always matches.

Every tick is a check, not a claim: both sides are evaluated for every input combination by the same engine as the Expressions tab. Converting a standard form to canonical form (and SOP to POS) is on the Expressions tab, under Canonical SOP and Canonical POS.