Skip to content
Part IA Michaelmas Term

Boolean Algebra

Overview

Boolean algebra is the mathematical framework for reasoning about logic functions. It operates on binary variables with the operations AND (·), OR (+), and NOT (overbar). The precedence rule is: NOT binds tightest, then AND, then OR. So a⋅b+ca \cdot b + c means (a⋅b)+c(a \cdot b) + c, not a⋅(b+c)a \cdot (b + c).

A combinational logic circuit has no internal stored state (no memory); its output depends solely on its current inputs. Boolean algebra describes the behaviour of such circuits and allows us to simplify them.

Basic Identities

Identities Involving Constants

NameIdentityMeaning
OR with 0a+0=aa + 0 = aOR-ing with FALSE leaves aa unchanged
AND with 0a⋅0=0a \cdot 0 = 0AND-ing with FALSE always gives FALSE
OR with 1a+1=1a + 1 = 1OR-ing with TRUE always gives TRUE
AND with 1a⋅1=aa \cdot 1 = aAND-ing with TRUE leaves aa unchanged

Complementation

NameIdentityMeaning
Complementa+aˉ=1a + \bar{a} = 1A variable OR its complement is always TRUE
a⋅aˉ=0a \cdot \bar{a} = 0A variable AND its complement is always FALSE

Idempotence

NameIdentityMeaning
a+a=aa + a = aOR-ing a variable with itself gives the variable
a⋅a=aa \cdot a = aAND-ing a variable with itself gives the variable

Involution (Double Complement)

a‾‾=a\overline{\overline{a}} = a

Complementing twice returns the original value. This is also why two bubbles in series cancel.

Commutative, Associative, and Distributive Laws

Commutative

a+b=b+aa + b = b + a a⋅b=b⋅aa \cdot b = b \cdot a

The order of operands does not matter for AND or OR.

Associative

(a+b)+c=a+(b+c)(a + b) + c = a + (b + c) (a⋅b)⋅c=a⋅(b⋅c)(a \cdot b) \cdot c = a \cdot (b \cdot c)

Grouping does not matter, so we write a+b+ca + b + c or a⋅b⋅ca \cdot b \cdot c without parentheses.

Distributive

Boolean algebra has two distributive laws, and the second one has no analogue in ordinary algebra:

a⋅(b+c)=(a⋅b)+(a⋅c)a \cdot (b + c) = (a \cdot b) + (a \cdot c) a+(b⋅c)=(a+b)⋅(a+c)(NEW: not true in ordinary algebra)a + (b \cdot c) = (a + b) \cdot (a + c) \qquad \text{(NEW: not true in ordinary algebra)}

The second law can be verified by truth table or algebraic expansion:

(a+b)⋅(a+c)=a⋅a+a⋅c+b⋅a+b⋅c=a+a⋅c+a⋅b+b⋅c=a+b⋅c(a + b) \cdot (a + c) = a \cdot a + a \cdot c + b \cdot a + b \cdot c = a + a \cdot c + a \cdot b + b \cdot c = a + b \cdot c

where the last step uses absorption (below).

Absorption Laws

a+(a⋅c)=aa + (a \cdot c) = a a⋅(a+c)=aa \cdot (a + c) = a

Proof of the first: a+a⋅c=a⋅1+a⋅c=a⋅(1+c)=a⋅1=aa + a \cdot c = a \cdot 1 + a \cdot c = a \cdot (1 + c) = a \cdot 1 = a.

Proof of the second: a⋅(a+c)=a⋅a+a⋅c=a+a⋅c=aa \cdot (a + c) = a \cdot a + a \cdot c = a + a \cdot c = a (using idempotence and the first absorption law).

Intuition: in a+a⋅ca + a \cdot c, if a=1a = 1 the output is 1 regardless of cc; if a=0a = 0 then a⋅c=0a \cdot c = 0 and 0+0=00 + 0 = 0. So the output is always exactly aa.

De Morgan’s Theorem (Preview)

De Morgan’s theorem tells us how to push complements through AND and OR:

a+b‾=aˉ⋅bˉ\overline{a + b} = \bar{a} \cdot \bar{b} a⋅b‾=aˉ+bˉ\overline{a \cdot b} = \bar{a} + \bar{b}

This is treated in full in the De Morgan’s Theorem note. For now, note its algebraic role: it allows us to transform AND expressions into OR expressions and vice versa.

Worked Simplification Examples

Example 1: a⋅b⋅c+a⋅b⋅cˉa \cdot b \cdot c + a \cdot b \cdot \bar{c}

a⋅b⋅c+a⋅b⋅cˉ=a⋅b⋅(c+cˉ)(factor a⋅b)=a⋅b⋅1(complement: c+cˉ=1)=a⋅b\begin{aligned} a \cdot b \cdot c + a \cdot b \cdot \bar{c} &= a \cdot b \cdot (c + \bar{c}) \quad \text{(factor } a \cdot b \text{)} \\ &= a \cdot b \cdot 1 \quad \text{(complement: } c + \bar{c} = 1 \text{)} \\ &= a \cdot b \end{aligned}

The two terms differ only in the complementation of cc; they combine to eliminate cc entirely. This technique, factoring out common literals and applying x+xˉ=1x + \bar{x} = 1, is the core algebraic simplification method.

Example 2: Show a⋅(aˉ+b)=a⋅ba \cdot (\bar{a} + b) = a \cdot b

a⋅(aˉ+b)=a⋅aˉ+a⋅b(distribute a)=0+a⋅b(complement: a⋅aˉ=0)=a⋅b\begin{aligned} a \cdot (\bar{a} + b) &= a \cdot \bar{a} + a \cdot b \quad \text{(distribute } a \text{)} \\ &= 0 + a \cdot b \quad \text{(complement: } a \cdot \bar{a} = 0 \text{)} \\ &= a \cdot b \end{aligned}

The term a⋅aˉa \cdot \bar{a} vanishes because a variable AND its complement is always 0.

Example 3: Show a+(aˉ⋅b)=a+ba + (\bar{a} \cdot b) = a + b

a+(aˉ⋅b)=(a+aˉ)⋅(a+b)(distribute OR over AND)=1⋅(a+b)(complement: a+aˉ=1)=a+b\begin{aligned} a + (\bar{a} \cdot b) &= (a + \bar{a}) \cdot (a + b) \quad \text{(distribute OR over AND)} \\ &= 1 \cdot (a + b) \quad \text{(complement: } a + \bar{a} = 1 \text{)} \\ &= a + b \end{aligned}

This uses the “new” distributive law a+(b⋅c)=(a+b)⋅(a+c)a + (b \cdot c) = (a + b) \cdot (a + c), which has no parallel in ordinary arithmetic.

Example 4: Simplify x⋅y+y⋅z+x⋅z+x⋅y⋅zx \cdot y + y \cdot z + x \cdot z + x \cdot y \cdot z

We use the technique of expanding each term to include all variables (by multiplying terms by (v+vˉ)=1(v + \bar{v}) = 1 for missing variables), then cancelling:

First, expand every term to include xx, yy, and zz:

  • x⋅y=x⋅y⋅(z+zˉ)=x⋅y⋅z+x⋅y⋅zˉx \cdot y = x \cdot y \cdot (z + \bar{z}) = x \cdot y \cdot z + x \cdot y \cdot \bar{z}
  • y⋅z=(x+xˉ)⋅y⋅z=x⋅y⋅z+xˉ⋅y⋅zy \cdot z = (x + \bar{x}) \cdot y \cdot z = x \cdot y \cdot z + \bar{x} \cdot y \cdot z
  • x⋅z=x⋅(y+yˉ)⋅z=x⋅y⋅z+x⋅yˉ⋅zx \cdot z = x \cdot (y + \bar{y}) \cdot z = x \cdot y \cdot z + x \cdot \bar{y} \cdot z
  • x⋅y⋅zx \cdot y \cdot z is already fully expanded

Now list all minterms:

x⋅y⋅zx \cdot y \cdot z (from xyxy), x⋅y⋅zˉx \cdot y \cdot \bar{z} (from xyxy), x⋅y⋅zx \cdot y \cdot z (from yzyz), xˉ⋅y⋅z\bar{x} \cdot y \cdot z (from yzyz), x⋅y⋅zx \cdot y \cdot z (from xzxz), x⋅yˉ⋅zx \cdot \bar{y} \cdot z (from xzxz), x⋅y⋅zx \cdot y \cdot z (from xyzxyz).

Removing duplicates, the distinct minterms are: x⋅y⋅zx \cdot y \cdot z, x⋅y⋅zˉx \cdot y \cdot \bar{z}, xˉ⋅y⋅z\bar{x} \cdot y \cdot z, x⋅yˉ⋅zx \cdot \bar{y} \cdot z.

Group:

x⋅y⋅z+x⋅y⋅zˉ+xˉ⋅y⋅z+x⋅yˉ⋅zx \cdot y \cdot z + x \cdot y \cdot \bar{z} + \bar{x} \cdot y \cdot z + x \cdot \bar{y} \cdot z =x⋅y⋅(z+zˉ)+y⋅z⋅(x+xˉ)= x \cdot y \cdot (z + \bar{z}) + y \cdot z \cdot (x + \bar{x}) =x⋅y+y⋅z= x \cdot y + y \cdot z

So the original expression simplifies to x⋅y+y⋅zx \cdot y + y \cdot z.

Consensus Theorem

The consensus theorem states:

a⋅b+aˉ⋅c+b⋅c=a⋅b+aˉ⋅ca \cdot b + \bar{a} \cdot c + b \cdot c = a \cdot b + \bar{a} \cdot c

The term b⋅cb \cdot c is the consensus of a⋅ba \cdot b and aˉ⋅c\bar{a} \cdot c: it is formed by taking the AND of all literals that appear in both terms, excluding the variable and its complement (aa and aˉ\bar{a}). The consensus term is redundant and can be added or removed without changing the function.

Proof

a⋅b+aˉ⋅c+b⋅c=a⋅b+aˉ⋅c+b⋅c⋅(a+aˉ)(multiply b⋅c by 1)=a⋅b+aˉ⋅c+a⋅b⋅c+aˉ⋅b⋅c(distribute)=(a⋅b+a⋅b⋅c)+(aˉ⋅c+aˉ⋅b⋅c)(rearrange)=a⋅b⋅(1+c)+aˉ⋅c⋅(1+b)(factor)=a⋅b+aˉ⋅c(since 1+x=1)\begin{aligned} a \cdot b + \bar{a} \cdot c + b \cdot c &= a \cdot b + \bar{a} \cdot c + b \cdot c \cdot (a + \bar{a}) \quad \text{(multiply } b \cdot c \text{ by 1)} \\ &= a \cdot b + \bar{a} \cdot c + a \cdot b \cdot c + \bar{a} \cdot b \cdot c \quad \text{(distribute)} \\ &= (a \cdot b + a \cdot b \cdot c) + (\bar{a} \cdot c + \bar{a} \cdot b \cdot c) \quad \text{(rearrange)} \\ &= a \cdot b \cdot (1 + c) + \bar{a} \cdot c \cdot (1 + b) \quad \text{(factor)} \\ &= a \cdot b + \bar{a} \cdot c \quad \text{(since } 1 + x = 1 \text{)} \end{aligned}

Dual Form

The dual of the consensus theorem (swap AND with OR, 0 with 1) gives:

(a+b)⋅(aˉ+c)⋅(b+c)=(a+b)⋅(aˉ+c)(a + b) \cdot (\bar{a} + c) \cdot (b + c) = (a + b) \cdot (\bar{a} + c)

The dual can be proven by applying De Morgan’s theorem to both sides of the original, or by a similar algebraic expansion.

Using Consensus: Adding and Eliminating Terms

The theorem works in both directions:

  • Elimination: If you see a⋅b+aˉ⋅c+b⋅ca \cdot b + \bar{a} \cdot c + b \cdot c, remove b⋅cb \cdot c to get a⋅b+aˉ⋅ca \cdot b + \bar{a} \cdot c.
  • Addition: If you have a⋅b+aˉ⋅ca \cdot b + \bar{a} \cdot c and need to combine it with other terms, you can add b⋅cb \cdot c without changing the function (useful for hazard removal, see Hazard Removal).

Example: Simplify a⋅b+aˉ⋅c+b⋅c+bˉ⋅c+a⋅bˉa \cdot b + \bar{a} \cdot c + b \cdot c + \bar{b} \cdot c + a \cdot \bar{b}.

First, identify consensus terms. The term b⋅cb \cdot c is the consensus of a⋅ba \cdot b and aˉ⋅c\bar{a} \cdot c, so it can be removed. After removal: a⋅b+aˉ⋅c+bˉ⋅c+a⋅bˉa \cdot b + \bar{a} \cdot c + \bar{b} \cdot c + a \cdot \bar{b}.

Now examine what remains. The term bˉ⋅c\bar{b} \cdot c and a⋅bˉa \cdot \bar{b} look for consensus with others. But note that aˉ⋅c+bˉ⋅c=aˉ⋅c\bar{a} \cdot c + \bar{b} \cdot c = \bar{a} \cdot c does not directly give consensus removal. In this case further algebraic inspection (or a K-map) reveals the minimal form.

Example with clear elimination: Simplify a⋅b+aˉ⋅c+b⋅c+bˉ⋅ca \cdot b + \bar{a} \cdot c + b \cdot c + \bar{b} \cdot c.

The term b⋅cb \cdot c is consensus of a⋅ba \cdot b and aˉ⋅c\bar{a} \cdot c (remove it). Check if bˉ⋅c\bar{b} \cdot c is consensus of any pair: no obvious pair. Result: a⋅b+aˉ⋅c+bˉ⋅ca \cdot b + \bar{a} \cdot c + \bar{b} \cdot c. Further, note aˉ⋅c+bˉ⋅c=(aˉ+bˉ)⋅c\bar{a} \cdot c + \bar{b} \cdot c = (\bar{a} + \bar{b}) \cdot c, which cannot be simplified further without additional context. The final expression depends on the specific terms.

Summary of Boolean Laws

LawOR formAND form
Identitya+0=aa + 0 = aa⋅1=aa \cdot 1 = a
Nulla+1=1a + 1 = 1a⋅0=0a \cdot 0 = 0
Idempotencea+a=aa + a = aa⋅a=aa \cdot a = a
Complementa+aˉ=1a + \bar{a} = 1a⋅aˉ=0a \cdot \bar{a} = 0
Involutiona‾‾=a\overline{\overline{a}} = a
Commutativea+b=b+aa + b = b + aa⋅b=b⋅aa \cdot b = b \cdot a
Associative(a+b)+c=a+(b+c)(a+b)+c = a+(b+c)(a⋅b)⋅c=a⋅(b⋅c)(a \cdot b) \cdot c = a \cdot (b \cdot c)
Distributivea+b⋅c=(a+b)⋅(a+c)a + b \cdot c = (a+b) \cdot (a+c)a⋅(b+c)=a⋅b+a⋅ca \cdot (b+c) = a \cdot b + a \cdot c
Absorptiona+a⋅b=aa + a \cdot b = aa⋅(a+b)=aa \cdot (a+b) = a
De Morgana+b‾=aˉ⋅bˉ\overline{a+b} = \bar{a} \cdot \bar{b}a⋅b‾=aˉ+bˉ\overline{a \cdot b} = \bar{a} + \bar{b}
Consensusa⋅b+aˉ⋅c+b⋅c=a⋅b+aˉ⋅ca \cdot b + \bar{a} \cdot c + b \cdot c = a \cdot b + \bar{a} \cdot c(a+b)⋅(aˉ+c)⋅(b+c)=(a+b)⋅(aˉ+c)(a+b) \cdot (\bar{a}+c) \cdot (b+c) = (a+b) \cdot (\bar{a}+c)