Use the following logic gate symbols: NOT, AND, OR, NAND, NOR, XOR

Published by Patrick Mutisya · 14 days ago

Cambridge A-Level Computer Science 9618 – Logic Gates and Logic Circuits

3.2 Logic Gates and Logic Circuits

Learning Objective

By the end of this lesson you should be able to:

  • Identify the symbols for the six basic logic gates: NOT, AND, OR, NAND, NOR, XOR.
  • Construct truth tables for each gate.
  • Write Boolean expressions using these gates.
  • Combine gates to form simple combinational circuits and predict their behaviour.

Gate Symbols and Boolean Functions

The following table summarises the graphical symbol, Boolean function and a typical Boolean expression for each gate.

GateSymbol (textual)Boolean FunctionTypical Expression
NOT¬A\$\overline{A}\$\$\overline{A}\$
ANDA·B\$A \cdot B\$\$A \, \&\& \, B\$
ORA+B\$A + B\$\$A \, || \, B\$
NAND¬(A·B)\$\overline{A \cdot B}\$\$\overline{(A \, \&\& \, B)}\$
NOR¬(A+B)\$\overline{A + B}\$\$\overline{(A \, || \, B)}\$
XORA⊕B\$A \oplus B\$\$A \, \text{xor} \, B\$

Truth Tables

Each gate’s behaviour is defined by its truth table. The tables below use the standard binary values 0 (false) and 1 (true).

NOT Gate

AOutput \$\overline{A}\$
01
10

AND Gate

ABOutput \$A \cdot B\$
000
010
100
111

OR Gate

ABOutput \$A + B\$
000
011
101
111

NAND Gate

ABOutput \$\overline{A \cdot B}\$
001
011
101
110

NOR Gate

ABOutput \$\overline{A + B}\$
001
010
100
110

XOR Gate

ABOutput \$A \oplus B\$
000
011
101
110

Combining Gates – Simple Combinational Circuits

A combinational circuit produces an output that depends only on the current inputs. The following example demonstrates how to build a circuit that implements the Boolean function:

\$F = (A \cdot B) + (\overline{C})\$

Steps to construct the circuit:

  1. Use an AND gate to combine inputs \$A\$ and \$B\$.
  2. Use a NOT gate to invert input \$C\$.
  3. Feed the outputs of the AND gate and the NOT gate into an OR gate.
  4. The output of the OR gate is \$F\$.

Suggested diagram: A three‑gate circuit showing AND (A,B) → NOT (C) → OR → F.

Worked Example – Truth Table for the Circuit

To verify the circuit, construct a truth table for all possible combinations of \$A\$, \$B\$, and \$C\$.

ABC\$A \cdot B\$\$\overline{C}\$\$F = (A \cdot B) + (\overline{C})\$
000011
001000
010011
011000
100011
101000
110111
111101

Common Pitfalls

  • Confusing the symbols for NAND and NOR – remember they are the negated forms of AND and OR respectively.
  • For XOR, the output is true only when the inputs differ; it is not the same as “OR but not AND”.
  • When drawing circuits, keep the flow of signals clear: inputs on the left, outputs on the right.

Summary

Understanding the six fundamental gates and their truth tables provides the foundation for designing more complex combinational and sequential circuits. Mastery of Boolean algebra, together with the ability to translate expressions into gate diagrams, is essential for the A‑Level Computer Science syllabus.