Show understanding of Boolean algebra

Resources | Subject Notes | Computer Science

15.2 Boolean Algebra and Logic Circuits — Cambridge A Level Computer Science

Overview

Boolean algebra is the algebra of two values: 0 (false) and 1 (true). It is the mathematical foundation of digital logic and is used to design, analyse and simplify logic circuits. Expressions use logical operators (AND, OR, NOT, XOR, XNOR) and are implemented using gates.

Basic Operators & Notation

  • AND — output true only if both inputs are true. Notation: \(A \cdot B\) or \(AB\).
  • OR — output true if at least one input is true. Notation: \(A + B\).
  • NOT — logical complement. Notation: \(\overline{A}\) or \(A'\).
  • XOR (exclusive OR) — true if inputs differ. Notation: \(A \oplus B\).

Fundamental Laws (must-know)

Write and use these to manipulate/simplify expressions.

Commutative

\(A + B = B + A\) and \(A \cdot B = B \cdot A\)

Associative

\(A + (B + C) = (A + B) + C\) and \(A (B C) = (A B) C\)

Distributive

\(A (B + C) = AB + AC\)

Useful for expanding or factoring expressions.

Identity & Null

\(A \cdot 1 = A,\quad A + 0 = A\)

\(A \cdot 0 = 0,\quad A + 1 = 1\)

Inverse

\(A \cdot \overline{A} = 0,\quad A + \overline{A} = 1\)

Idempotent & Absorption

\(A + A = A,\quad A \cdot A = A\)

\(A + A B = A,\quad A (A + B) = A\)

De Morgan's Laws

\(\overline{A \cdot B} = \overline{A} + \overline{B}\)

\(\overline{A + B} = \overline{A} \cdot \overline{B}\)

Truth Tables — how to check behaviour

Construct truth tables to verify expressions or gate-level circuits.

Example: \(A + B\)

AB\(A + B\)
000
011
101
111

Example: XOR \(A \oplus B\)

AB\(A \oplus B\)
000
011
101
110

Simplification techniques

Cambridge assessments often require you to simplify Boolean expressions algebraically and sometimes by using Karnaugh maps (K-maps). Both are acceptable — K-maps are particularly useful to visualise minterm grouping.

Algebraic simplification — worked example

Simplify: \(F = A\overline{B} + A B + \overline{A} B\).

Step-by-step (use commutativity/associativity/absorption):

\(F = A\overline{B} + AB + \overline{A}B\)

Group the \(B\) terms: \(F = A\overline{B} + B(A + \overline{A})\)

But \(A + \overline{A} = 1\), so \(B(A + \overline{A}) = B\). Thus

\(F = A\overline{B} + B\)

Use absorption: \(B + A\overline{B} = B + A\overline{B} = (B + A)(B + \overline{B}) = (B + A)\cdot 1 = A + B\)

Final: \(F = A + B\)

Karnaugh map (2-variable) — quick

For two variables, the K-map is a 2×2 grid — group adjacent 1s to simplify into sum-of-products.

From Boolean expressions to logic gates

Translate expressions to gate-level diagrams (AND, OR, NOT, XOR, XNOR). Cambridge requires correct logic and minimal implementation where asked.

Half adder

The half adder adds two bits \(A\) and \(B\), producing sum \(S\) and carry \(C\):

\(S = A \oplus B\)

\(C = A \cdot B\)

Full adder

Adds \(A\), \(B\) and carry-in \(C_{in}\). Results:

\(S = A \oplus B \oplus C_{in}\)

\(C_{out} = AB + A C_{in} + B C_{in}\)

You may be asked to show how a full adder can be built from two half adders and an OR gate: combine partial sums and carries accordingly.

Common exam-style tasks

  • Use Boolean algebra to simplify an expression and show each step with a stated law.
  • Derive a truth table from an expression and vice versa (produce the minimal expression from a truth table).
  • Convert a logic gate diagram to a Boolean expression and simplify it.
  • Design combinational circuits such as adders, multiplexers (MUX), demultiplexers, encoders and decoders.

Practice question 1

Simplify \(G = \overline{A}B + A\overline{B} + AB\).

Solution sketch:

Group: \(G = (\overline{A}B + A\overline{B}) + AB = A \oplus B + AB\)

Use identity \(X \oplus Y = XY' + X'Y\). Then \(A \oplus B + AB = (A \oplus B) + AB = A + B\) (you can show algebraically). Final: \(G = A + B\).

Practice question 2

From the truth table below deduce the minimal sum-of-products expression.

ABCF
0000
0011
0101
0111
1000
1011
1100
1111

Hint: list minterms where \(F=1\): (0,0,1), (0,1,0), (0,1,1), (1,0,1), (1,1,1). Use K-map grouping to simplify.

Tips for Cambridge A-Level

  • Always state the law used at each algebraic step (e.g., "by De Morgan's", "by absorption").
  • When asked for a minimal implementation, show either algebraic simplification or a K-map (both are accepted if correct).
  • Label truth tables clearly and keep working tidy — examiners look for method as well as final answer.
  • Understand gate-level implementations: be able to draw gates from expressions and deduce expressions from diagrams.