Logic Gates (Cambridge International A-Level Computer Science)
Exam board Cambridge International · A-LevelUpdated 2026-10-01
Logic gates
What is a logic gate?
-
A logic gate is a visual way of representing a Boolean expression
-
The logic gates covered in this course are:
- AND
- OR
- NOT
- XOR
- NAND
- NOR
AND
| Expression operator | Circuit symbol | Function |
|---|---|---|
| (A **AND **B) | ![]() | Returns TRUE only if** both** inputs are TRUE TRUE AND TRUE= TRUE Otherwise = FALSE |
OR
| Expression operator | Circuit symbol | Function |
|---|---|---|
| (A OR B) | ![]() | Returns TRUE if either input is TRUE TRUE OR FALSE= TRUE FALSE OR FALSE= FALSE |
NOT
| Expression operator | Circuit symbol | Function |
|---|---|---|
| (NOT A) | ![]() | Reverses the input value NOT TRUE= FALSE NOT FALSE= TRUE |
XOR (exclusive OR)
| Expression operator | Circuit symbol | Function |
|---|---|---|
| (A XOR B) | ![]() | Returns TRUE if either input is TRUE but NOT both TRUE XOR FALSE = TRUE FALSE XOR FALSE = FALSE TRUE XOR TRUE = FALSE |
NAND (not and)
| Expression operator | Circuit symbol | Function |
|---|---|---|
| (A NAND B) | ![]() | Returns TRUE if either or both inputs are FALSE TRUE NAND FALSE = TRUE FALSE NAND FALSE = TRUE TRUE NAND TRUE = FALSE |
NOR (not OR)
| Expression operator | Circuit symbol | Function |
|---|---|---|
| (A NOR B) | ![]() | Returns TRUE if both inputs are FALSE TRUE NOR FALSE = FALSE FALSE NOR FALSE = TRUE TRUE NOR TRUE = FALSE |
Truth tables
What is a truth table?
- A truth table is a tool used in logic and computer science to visualise the results of Boolean expressions
- They represent all possible inputs and the associated outputs for a given Boolean expression
AND
| Circuit symbol | Truth Table |
|---|---|
![]() | | A | B | A AND B | |---|---|---| | 0 | 0 | 0 | | 0 | 1 | 0 | | 1 | 0 | 0 | | 1 | 1 | 1 | |
OR
| Circuit symbol | Truth Table |
|---|---|
![]() | | A | B | A OR B | |---|---|---| | 0 | 0 | 0 | | 0 | 1 | 1 | | 1 | 0 | 1 | | 1 | 1 | 1 | |
NOT
| Circuit symbol | Truth Table |
|---|---|
![]() | | A | NOT A | |---|---| | 0 | 1 | | 1 | 0 | |
XOR (exclusive)
| Circuit symbol | Truth Table |
|---|---|
![]() | | A | B | A XOR B | |---|---|---| | 0 | 0 | 0 | | 0 | 1 | 1 | | 1 | 0 | 1 | | 1 | 1 | 0 | |
NAND (not and)
| Circuit symbol | Truth Table |
|---|---|
![]() | | A | B | NOT (A AND B) | |---|---|---| | 0 | 0 | 1 | | 0 | 1 | 1 | | 1 | 0 | 1 | | 1 | 1 | 0 | |
NOR (not or)
| Circuit symbol | Truth Table |
|---|---|
![]() | | A | B | NOT (A OR B) | |---|---|---| | 0 | 0 | 1 | | 0 | 1 | 0 | | 1 | 0 | 0 | | 1 | 1 | 0 | |
Was this revision note helpful?








