Welcome to Boolean Algebra!
Welcome to one of the most exciting and practical topics in AS 2 Section D: Discrete and Decision Mathematics! Have you ever wondered how computers make decisions, how smartphones process billions of calculations every second, or how a simple light switch system in a hallway works? The secret behind all of this is Boolean Algebra.
Named after the 19th-century mathematician George Boole, Boolean algebra is a branch of mathematics where the variables have only two possible values: True or False (written as \(1\) and \(0\)). Instead of standard arithmetic operations like addition and multiplication, we work with logical operations such as AND, OR, and NOT.
Don't worry if this seems abstract at first! Once you learn the basic rules, Boolean algebra is just like playing an enjoyable puzzle game where you simplify expressions step by step.
1. The Fundamentals: Truth Values and Basic Operations
In standard algebra, a variable \(x\) can be any real number like \(2\), \(-5\), or \(3.14\). In Boolean algebra, any variable \(A\), \(B\), or \(C\) can only take one of two values:
• \(1\) represents True, High, or an ON switch.
• \(0\) represents False, Low, or an OFF switch.
There are three primary operations you need to know:
A. The NOT Operation (Negation / Complement)
The NOT operation simply flips the value to its opposite. If something is true, NOT makes it false.
Notation: \(\overline{A}\), \(A'\), or \(\neg A\). (In CCEA, the overline \(\overline{A}\) and prime \(A'\) are commonly used).
• If \(A = 0\), then \(\overline{A} = 1\)
• If \(A = 1\), then \(\overline{A} = 0\)
B. The AND Operation (Conjunction)
The AND operation outputs \(1\) only if both inputs are \(1\). If either input is \(0\), the output is \(0\).
Notation: \(A \cdot B\), \(A \wedge B\), or simply \(AB\).
• \(0 \cdot 0 = 0\)
• \(0 \cdot 1 = 0\)
• \(1 \cdot 0 = 0\)
• \(1 \cdot 1 = 1\)
Analogy: Imagine a security door that requires both a keycard AND a passcode to unlock. If you only have one of them, the door stays locked!
C. The OR Operation (Disjunction)
The OR operation outputs \(1\) if at least one input is \(1\). It only outputs \(0\) if both inputs are \(0\).
Notation: \(A + B\) or \(A \vee B\).
• \(0 + 0 = 0\)
• \(0 + 1 = 1\)
• \(1 + 0 = 1\)
• \(1 + 1 = 1\) (Important: In Boolean algebra, \(1 + 1 = 1\), not \(2\)!)
Analogy: Imagine entering a cinema using either an electronic e-ticket OR a paper ticket. Having either one (or both!) lets you in.
Key Takeaway:
NOT flips the value. AND requires all inputs to be \(1\). OR requires at least one input to be \(1\).
2. Switching Circuits and Logic Gates
Boolean algebra provides the exact mathematical model used to design real-world electronic systems and switching networks.
Switches in Series vs Switches in Parallel
• Series Connection (AND): Two switches \(A\) and \(B\) placed one after the other on a wire. Electricity flows from start to finish only when switch \(A\) AND switch \(B\) are closed. Expression: \(A \cdot B\).
• Parallel Connection (OR): Two switches \(A\) and \(B\) placed on separate parallel branches. Electricity flows if switch \(A\) OR switch \(B\) is closed. Expression: \(A + B\).
Logic Gates
In electronic circuit diagrams, logic gates are standard building blocks:
• NOT Gate (Inverter): Triangle with a small circle at the output.
• AND Gate: D-shaped symbol.
• OR Gate: Curved shield symbol.
• NAND Gate: AND gate with an inverting circle at the output, representing \(\overline{A \cdot B}\).
• NOR Gate: OR gate with an inverting circle at the output, representing \(\overline{A + B}\).
• XOR Gate (Exclusive OR): Outputs \(1\) if inputs are different: \(A \oplus B = A\overline{B} + \overline{A}B\).
Did you know? NAND and NOR gates are called universal gates because any Boolean function can be built entirely out of just NAND gates or just NOR gates!
3. The Laws of Boolean Algebra
To simplify complex logical statements and design cheaper, faster circuits, we use a set of fundamental algebraic laws. Learn these rules well—they are your primary problem-solving toolkit!
1. Identity Laws
• \(A + 0 = A\) (Adding 0 does nothing)
• \(A \cdot 1 = A\) (Multiplying by 1 does nothing)
2. Null (Domination / Annulment) Laws
• \(A + 1 = 1\) (True OR anything is always True)
• \(A \cdot 0 = 0\) (False AND anything is always False)
3. Idempotent Laws
• \(A + A = A\)
• \(A \cdot A = A\)
4. Complement (Inverse) Laws
• \(A + \overline{A} = 1\) (A statement or its opposite must be True)
• \(A \cdot \overline{A} = 0\) (A statement and its opposite cannot both be True)
5. Involution (Double Negation) Law
• \(\overline{\overline{A}} = A\) (Flipping a value twice returns the original value)
6. Commutative Laws
• \(A + B = B + A\)
• \(A \cdot B = B \cdot A\)
7. Associative Laws
• \(A + (B + C) = (A + B) + C\)
• \(A \cdot (B \cdot C) = (A \cdot B) \cdot C\)
8. Distributive Laws
• First Form: \(A \cdot (B + C) = (A \cdot B) + (A \cdot C)\) (Just like normal algebra!)
• Second Form: \(A + (B \cdot C) = (A + B) \cdot (A + C)\) (Watch out: This is unique to Boolean algebra and is extremely useful for factorising!)
9. Absorption Laws
• \(A + (A \cdot B) = A\)
• \(A \cdot (A + B) = A\)
Why does this work? Look at the first one: \(A + AB = A \cdot 1 + A \cdot B = A(1 + B) = A(1) = A\). The smaller term "\(A\)" absorbs the larger term "\(AB\)"!
10. De Morgan's Laws
De Morgan's Laws are essential for breaking long negation bars over expressions:
• \(\overline{A \cdot B} = \overline{A} + \overline{B}\) ("Break the line, change the sign: AND becomes OR")
• \(\overline{A + B} = \overline{A} \cdot \overline{B}\) ("Break the line, change the sign: OR becomes AND")
Memory Trick for De Morgan's Laws:
Whenever you split a bar over two variables, always flip the operator between them: \(\cdot\) flips to \(+\), and \(+\) flips to \(\cdot\).
4. Step-by-Step Algebraic Simplification
Examiners love asking you to simplify complex Boolean expressions. Always state which law you apply at each step.
Worked Example 1
Simplify the expression \(E = A\overline{B} + AB\).
Step 1: Factor out the common term \(A\) using the Distributive Law:
\(E = A(\overline{B} + B)\)
Step 2: Apply the Complement Law (\(\overline{B} + B = 1\)):
\(E = A(1)\)
Step 3: Apply the Identity Law (\(A \cdot 1 = A\)):
\(E = A\)
Final Answer: \(A\)
Worked Example 2
Simplify the expression \(F = (A + B)(A + \overline{B})\).
Step 1: Expand the brackets or apply the second Distributive Law \(X + YZ = (X+Y)(X+Z)\) in reverse where \(X = A\), \(Y = B\), \(Z = \overline{B}\):
\(F = A + (B \cdot \overline{B})\)
Step 2: Apply the Complement Law (\(B \cdot \overline{B} = 0\)):
\(F = A + 0\)
Step 3: Apply the Identity Law:
\(F = A\)
Final Answer: \(A\)
Worked Example 3 (Using De Morgan's Laws)
Simplify the expression \(G = \overline{\overline{A} + B} + \overline{A \cdot \overline{B}}\).
Step 1: Apply De Morgan's Law to the first part \(\overline{\overline{A} + B} = \overline{\overline{A}} \cdot \overline{B} = A\overline{B}\):
\(G = A\overline{B} + \overline{A \cdot \overline{B}}\)
Step 2: Apply De Morgan's Law to the second part \(\overline{A \cdot \overline{B}} = \overline{A} + \overline{\overline{B}} = \overline{A} + B\):
\(G = A\overline{B} + \overline{A} + B\)
Step 3: Rearrange using Commutative and Associative Laws:
\(G = (\overline{A} + A\overline{B}) + B\)
Step 4: Use the identity \(\overline{A} + AB = \overline{A} + B\), so here \(\overline{A} + A\overline{B} = \overline{A} + \overline{B}\):
\(G = \overline{A} + \overline{B} + B\)
Step 5: Apply the Complement Law (\(\overline{B} + B = 1\)):
\(G = \overline{A} + 1\)
Step 6: Apply the Null Law (\(\overline{A} + 1 = 1\)):
\(G = 1\)
Final Answer: \(1\)
5. Truth Tables and Proving Equivalence
A truth table lists every possible combination of input values (\(0\) and \(1\)) and calculates the output for each combination.
• For \(2\) variables (\(A, B\)), there are \(2^2 = 4\) rows: \((0,0), (0,1), (1,0), (1,1)\).
• For \(3\) variables (\(A, B, C\)), there are \(2^3 = 8\) rows.
Proving an Identity Using a Truth Table
Let us prove the Absorption Law: \(A + AB = A\).
Row 1: \(A = 0, B = 0 \implies AB = 0 \implies A + AB = 0 + 0 = \mathbf{0}\)
Row 2: \(A = 0, B = 1 \implies AB = 0 \implies A + AB = 0 + 0 = \mathbf{0}\)
Row 3: \(A = 1, B = 0 \implies AB = 0 \implies A + AB = 1 + 0 = \mathbf{1}\)
Row 4: \(A = 1, B = 1 \implies AB = 1 \implies A + AB = 1 + 1 = \mathbf{1}\)
Notice that the final column for \(A + AB\) gives the exact values \((0, 0, 1, 1)\), which is identical to the column for \(A\). Therefore, \(A + AB = A\) is proven!
6. The Principle of Duality
The Principle of Duality is a powerful property of Boolean algebra. It states that any valid Boolean identity remains valid if you:
1. Swap all AND (\(\cdot\)) operations with OR (\(+\)) operations, and vice versa.
2. Swap all 0s with 1s, and vice versa.
3. Keep all variable names and their complements unchanged.
Example:
Starting with the identity: \(A + \overline{A} = 1\)
Its dual is obtained by replacing \(+\) with \(\cdot\) and \(1\) with \(0\):
\(A \cdot \overline{A} = 0\)
7. Common Mistakes to Avoid
• Mixing up regular addition with Boolean addition: Remember \(1 + 1 = 1\), not \(2\).
• De Morgan sign error: Forgetting to change the operator when breaking a bar. Remember: \(\overline{A + B} \neq \overline{A} + \overline{B}\). It must be \(\overline{A} \cdot \overline{B}\).
• Overlooking the second Distributive Law: Students often don't recognise that \(A + BC = (A+B)(A+C)\). This is a great shortcut in algebraic proofs!
• Missing hidden absorptions: Look out for patterns like \(A + \overline{A}B = A + B\).
Quick Review Summary
• Values: Only \(0\) (False) and \(1\) (True).
• Core Operators: NOT (\(\overline{A}\)), AND (\(A \cdot B\)), OR (\(A + B\)).
• De Morgan's Laws: \(\overline{AB} = \overline{A} + \overline{B}\) and \(\overline{A+B} = \overline{A} \cdot \overline{B}\).
• Absorption: \(A + AB = A\) and \(A(A + B) = A\).
• Equivalence: Can be established either by step-by-step algebraic manipulation or by showing that truth table output columns match completely.