Construct the truth table for each of the logic gates above

Published by Patrick Mutisya · 14 days ago

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

3.2 Logic Gates and Logic Circuits

In this section we review the basic logic gates used in digital electronics and construct the corresponding truth tables. Understanding these tables is essential for designing and analysing combinational circuits.

Learning Objective

Construct the truth table for each of the logic gates listed below.

Basic Logic Gates

  • AND gate – \$A \cdot B\$
  • OR gate – \$A + B\$
  • NOT gate – \$\overline{A}\$ (inverter)
  • NAND gate – \$\overline{(A \cdot B)}\$
  • NOR gate – \$\overline{(A + B)}\$
  • XOR gate – \$A \oplus B\$ (exclusive‑OR)
  • XNOR gate – \$\overline{(A \oplus B)}\$ (exclusive‑NOR)

Truth Tables

1. AND Gate (\$A \cdot B\$)

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

2. OR Gate (\$A + B\$)

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

3. NOT Gate (Inverter) – \$\overline{A}\$

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

4. NAND Gate – \$\overline{(A \cdot B)}\$

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

5. NOR Gate – \$\overline{(A + B)}\$

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

6. XOR Gate – \$A \oplus B\$

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

7. XNOR Gate – \$\overline{(A \oplus B)}\$

ABOutput \$\overline{(A \oplus B)}\$
001
010
100
111

Extended Example – 3‑Input AND Gate

For gates with more than two inputs the principle is the same: the output is true only when all inputs are true.

ABCOutput \$A \cdot B \cdot C\$
0000
0010
0100
0110
1000
1010
1100
1111

Suggested diagram: Symbolic representation of each gate (AND, OR, NOT, NAND, NOR, XOR, XNOR) with input and output lines.

Summary

  1. Identify the logical operation required.
  2. List all possible input combinations (binary counting).
  3. Apply the definition of the gate to each combination to determine the output.
  4. Record the results in a truth table.

Mastering these truth tables provides the foundation for building more complex combinational circuits such as adders, multiplexers, and decoders.