Understand and define the functions of: NOT, AND, OR, NAND, NOR and XOR (EOR) gates

3.2 Logic Gates and Logic Circuits

In digital electronics, logic gates are the building blocks that perform Boolean operations on binary inputs. Below we explore the six most common gates, their truth tables, and everyday analogies to help you grasp their functions.

NOT Gate (Inverter) – “Flip‑Flop”

The NOT gate takes a single input and outputs the opposite value. Think of it as a light switch that turns on when you flip it off and vice‑versa. 🔄

Mathematically: $$\text{NOT}(A) = eg A$$

A ¬A
0 1
1 0

AND Gate – “Both Must Be True”

The AND gate outputs 1 only if **both** inputs are 1. Imagine two friends needing to agree before starting a game. 🎲

Mathematically: $$A \land B$$

A B A∧B
0 0 0
0 1 0
1 0 0
1 1 1

OR Gate – “At Least One”

The OR gate outputs 1 if **either** input is 1. Think of a vending machine that dispenses a snack if you insert a coin or a card. 💰

Mathematically: $$A \lor B$$

A B A∨B
0 0 0
0 1 1
1 0 1
1 1 1

NAND Gate – “Not AND” (Inverter of AND)

The NAND gate is the opposite of AND. It outputs 0 only when **both** inputs are 1. Picture a safety lock that opens unless both keys are inserted. 🔐

Mathematically: $$eg(A \land B)$$

A B ¬(A∧B)
0 0 1
0 1 1
1 0 1
1 1 0

NOR Gate – “Not OR” (Inverter of OR)

The NOR gate outputs 1 only when **both** inputs are 0. Think of a night‑light that turns on only when the room is completely dark. 🌙

Mathematically: $$eg(A \lor B)$$

A B ¬(A∨B)
0 0 1
0 1 0
1 0 0
1 1 0

XOR Gate (EOR – Exclusive OR)

The XOR gate outputs 1 when **exactly one** input is 1. Imagine a game of “odd or even” where you win if the total number of heads is odd. ⚖️

Mathematically: $$A \oplus B = (A \lor B) \land eg(A \land B)$$

A B A⊕B
0 0 0
0 1 1
1 0 1
1 1 0

Key Take‑aways for A‑Level CS

  1. Each gate implements a Boolean function that can be expressed with logical operators ($eg$, $\land$, $\lor$, $\oplus$).
  2. Truth tables are the quickest way to verify gate behaviour.
  3. Complex circuits are built by combining these basic gates; e.g., a full adder uses AND, OR, XOR, and NOT.
  4. Remember that NAND and NOR are universal gates – any logic function can be built using only one of them.
  5. Practice drawing circuits and writing truth tables to solidify your understanding.

Revision

Log in to practice.

2 views 0 suggestions