What is Boolean Algebra?

  • Boolean algebra is a mathematical system used to manipulate and simplify Boolean values (True/False or 1/0)
  • It is essential in Computer Science for optimising logic circuits
  • Complex expressions can be reduced to simpler forms, meaning fewer logic gates are required in the physical hardware
  • It offers a more powerful simplification method than Karnaugh maps, as it can handle expressions with more variables and algebraic relationships
  • By combining specific laws and rules, complex logic can often be reduced to a single term

General Rules

These fundamental rules deal with how variables interact with constants (0 and 1) and themselves.

General AND Rules

Null Law

  • Any value AND 0 is always 0

Identity Law

  • Any value AND 1 remains unchanged

Idempotent Law

  • Connecting two inputs to the same variable results in that variable

Inverse Law

  • A variable cannot be True AND False simultaneously

General OR Rules

Identity Law

  • Any value OR 0 remains unchanged

Null Law

  • If one input is 1, the output is always 1

Idempotent Law

  • Connecting two inputs to the same variable results in that variable

Inverse Law

  • Either the variable or its opposite must be true

De Morgan’s Laws

De Morgan’s Laws provide a strategy for simplifying expressions that involve the negation of a conjunction (AND) or a disjunction (OR).

A common mnemonic for this process is: “Break the bar and change the sign”

Law 1: Negation of AND

The negation of a conjunction is the disjunction of the negations.

Truth Table Proof:

AB
0001=111
0101=101
1001=011
1110=000

Law 2: Negation of OR

The negation of a disjunction is the conjunction of the negations.

Truth Table Proof:

AB
0001=111
0110=100
1010=010
1110=000

Applying De Morgan’s Law (Step-by-Step)

Example 1:

  1. Identify the operator inside the brackets ():
  2. Invert the operator ():
  3. Negate each term:
  4. Remove the outer negation:

Example 2:

  1. Identify the operator inside the brackets ():
  2. Invert the operator ():
  3. Negate each term:
  4. Remove the outer negation:

Example 3:

  1. Identify the operator inside the brackets ():
  2. Invert the operator ():
  3. Negate each term:
  4. Remove the outer negation:

Example 4:

  1. Identify the main operator ():
  2. Invert the operator ():
  3. Apply De Morgan’s law to the inner brackets:
  4. Remove the outer negation:

Example 5:

  1. Identify the main operator ():
  2. Invert the operator ():
  3. Apply De Morgan’s law to the inner brackets:
  4. Remove the outer negation:
  • Simplifying using this law allows the use of only NAND or NOR gates which makes building microprocessors much easier (i.e. Flash drives)

Double Negation

Double negation cancels itself out.

Real-life example:

  • “It is not true that I am not hungry” is the same as saying “I am hungry”

Distribution

The Distributive Law explains how AND and OR interact, similar to expanding brackets in standard maths. This allows you to multiply out or factorise expressions.

AND over OR

OR over AND (Unique to Boolean Algebra)

Real-life example for “OR over AND”:

  • Ordering a meal deal: “You must choose a Sandwich OR (Chips AND Drink)”
  • This is logically equivalent to: “(Sandwich OR Chips) AND (Sandwich OR Drink)”
  • You must satisfy both conditions

Association

The Associative Law allows the regrouping of variables when the operators are the same. Brackets can be moved or removed without changing the logic.


Commutation

The Commutative Law states that the order of variables does not matter.


Absorption

Absorption rules are powerful tools for eliminating redundant terms quickly. If a term outside the bracket is repeated inside the bracket with the opposite operator, the outside term “absorbs” the rest.

Why does this work? Looking at :

  • If : The result is , which is always 1 ()
  • If : The result is , which is 0 ()
  • Therefore, is irrelevant

Worked Example

Question: Simplify the expression

Step 1: Apply De Morgan’s Law First, look at the term . Apply the “break the bar, change the sign” rule.

Step 2: Factorise (Distribution) Notice that both parts of the expression share a common term: . We can factor this out, just like factorising to in maths.

Step 3: Apply Inverse Rule Look at the bracket . The Inverse Law states that .

Step 4: Apply Identity Rule The Identity Law states that .

Final Answer: