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 ab+ca \cdot b + c means (ab)+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 0a0=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 1a1=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
aaˉ=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
aa=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 ab=baa \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) (ab)c=a(bc)(a \cdot b) \cdot c = a \cdot (b \cdot c)

Grouping does not matter, so we write a+b+ca + b + c or abca \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)=(ab)+(ac)a \cdot (b + c) = (a \cdot b) + (a \cdot c) a+(bc)=(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)=aa+ac+ba+bc=a+ac+ab+bc=a+bc(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+(ac)=aa + (a \cdot c) = a a(a+c)=aa \cdot (a + c) = a

Proof of the first: a+ac=a1+ac=a(1+c)=a1=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)=aa+ac=a+ac=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+aca + a \cdot c, if a=1a = 1 the output is 1 regardless of cc; if a=0a = 0 then ac=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} ab=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: abc+abcˉa \cdot b \cdot c + a \cdot b \cdot \bar{c}

abc+abcˉ=ab(c+cˉ)(factor ab)=ab1(complement: c+cˉ=1)=ab\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)=aba \cdot (\bar{a} + b) = a \cdot b

a(aˉ+b)=aaˉ+ab(distribute a)=0+ab(complement: aaˉ=0)=ab\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 aaˉ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+(bc)=(a+b)(a+c)a + (b \cdot c) = (a + b) \cdot (a + c), which has no parallel in ordinary arithmetic.

Example 4: Simplify xy+yz+xz+xyzx \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:

  • xy=xy(z+zˉ)=xyz+xyzˉx \cdot y = x \cdot y \cdot (z + \bar{z}) = x \cdot y \cdot z + x \cdot y \cdot \bar{z}
  • yz=(x+xˉ)yz=xyz+xˉyzy \cdot z = (x + \bar{x}) \cdot y \cdot z = x \cdot y \cdot z + \bar{x} \cdot y \cdot z
  • xz=x(y+yˉ)z=xyz+xyˉzx \cdot z = x \cdot (y + \bar{y}) \cdot z = x \cdot y \cdot z + x \cdot \bar{y} \cdot z
  • xyzx \cdot y \cdot z is already fully expanded

Now list all minterms:

xyzx \cdot y \cdot z (from xyxy), xyzˉx \cdot y \cdot \bar{z} (from xyxy), xyzx \cdot y \cdot z (from yzyz), xˉyz\bar{x} \cdot y \cdot z (from yzyz), xyzx \cdot y \cdot z (from xzxz), xyˉzx \cdot \bar{y} \cdot z (from xzxz), xyzx \cdot y \cdot z (from xyzxyz).

Removing duplicates, the distinct minterms are: xyzx \cdot y \cdot z, xyzˉx \cdot y \cdot \bar{z}, xˉyz\bar{x} \cdot y \cdot z, xyˉzx \cdot \bar{y} \cdot z.

Group:

xyz+xyzˉ+xˉyz+xyˉzx \cdot y \cdot z + x \cdot y \cdot \bar{z} + \bar{x} \cdot y \cdot z + x \cdot \bar{y} \cdot z =xy(z+zˉ)+yz(x+xˉ)= x \cdot y \cdot (z + \bar{z}) + y \cdot z \cdot (x + \bar{x}) =xy+yz= x \cdot y + y \cdot z

So the original expression simplifies to xy+yzx \cdot y + y \cdot z.

Consensus Theorem

The consensus theorem states:

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

The term bcb \cdot c is the consensus of aba \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

ab+aˉc+bc=ab+aˉc+bc(a+aˉ)(multiply bc by 1)=ab+aˉc+abc+aˉbc(distribute)=(ab+abc)+(aˉc+aˉbc)(rearrange)=ab(1+c)+aˉc(1+b)(factor)=ab+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 ab+aˉc+bca \cdot b + \bar{a} \cdot c + b \cdot c, remove bcb \cdot c to get ab+aˉca \cdot b + \bar{a} \cdot c.
  • Addition: If you have ab+aˉca \cdot b + \bar{a} \cdot c and need to combine it with other terms, you can add bcb \cdot c without changing the function (useful for hazard removal, see Hazard Removal).

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

First, identify consensus terms. The term bcb \cdot c is the consensus of aba \cdot b and aˉc\bar{a} \cdot c, so it can be removed. After removal: ab+aˉc+bˉc+abˉ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 abˉ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 ab+aˉc+bc+bˉca \cdot b + \bar{a} \cdot c + b \cdot c + \bar{b} \cdot c.

The term bcb \cdot c is consensus of aba \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: ab+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 = aa1=aa \cdot 1 = a
Nulla+1=1a + 1 = 1a0=0a \cdot 0 = 0
Idempotencea+a=aa + a = aaa=aa \cdot a = a
Complementa+aˉ=1a + \bar{a} = 1aaˉ=0a \cdot \bar{a} = 0
Involutiona=a\overline{\overline{a}} = a
Commutativea+b=b+aa + b = b + aab=baa \cdot b = b \cdot a
Associative(a+b)+c=a+(b+c)(a+b)+c = a+(b+c)(ab)c=a(bc)(a \cdot b) \cdot c = a \cdot (b \cdot c)
Distributivea+bc=(a+b)(a+c)a + b \cdot c = (a+b) \cdot (a+c)a(b+c)=ab+aca \cdot (b+c) = a \cdot b + a \cdot c
Absorptiona+ab=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}ab=aˉ+bˉ\overline{a \cdot b} = \bar{a} + \bar{b}
Consensusab+aˉc+bc=ab+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)