Skip to content
BetterDL

Boolean algebra

Also called: switching algebra, algebra of logic, Boole's algebra

The algebra of variables that can only be 0 or 1, combined with AND, OR and NOT. It is the mathematics behind every digital circuit.

Boolean algebra is algebra with only two values, 0 and 1, and three basic operations: AND, OR and NOT. It is named after George Boole, who used it in the 1800s to describe logical reasoning. In the 1930s it was applied to switching circuits, and it has been the language of digital design ever since.

Why it matters: every digital circuit computes a boolean function. Writing that function as a boolean expression lets you reason about the circuit on paper, and rewriting the expression with the laws of boolean algebra gives a smaller circuit that does the same job.

It looks like school algebra, but it is not the same:

  • + means OR, so = 1, not 2.
  • There is no subtraction or division, so you cannot cancel: = does not mean B = C.
  • Repeating changes nothing: = A and = A.
  • OR distributes over AND: = , which fails for ordinary numbers.

Because there are only two values, any claim can be checked by trying every input in a truth table.

00001
01011
10010
11110

Worked examples

Example

Why you cannot cancel

Suppose = . Does that force B = C?

  1. 1.

    Try A = 1, B = 0, C = 1.

  2. 2.

    = 1 + 0 = 1 and = 1 + 1 = 1, so the two sides are equal.

  3. 3.

    But B = 0 and C = 1, so B ≠ C.

  4. 4.

    Ordinary algebra would subtract A from both sides. Boolean algebra has no subtraction, so only the laws may be used.

Example

1 + 1

Evaluate and .

  1. 1.

    : OR asks whether at least one input is 1. Yes, so the result is 1.

  2. 2.

    : AND first, 1 · 0 = 0, then 1 + 0 = 1.

  3. 3.

    Every result in Boolean algebra is 0 or 1.

Common mistakes

  • Carrying arithmetic habits over: writing 1 + 1 = 2, A + A = 2A or AA = A².

  • Cancelling a term from both sides of an equation. Only the laws of Boolean algebra may be used.

Practice Boolean algebra

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Boolean algebra is taught in Boolean Algebra.