You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Boolean logic is one of the most important topics in GCSE Computer Science. It underpins how every computer processor makes decisions, and you will be expected to understand, apply and evaluate Boolean logic across several areas of your exam.
Boolean logic is a form of algebra in which all values are reduced to one of two states: TRUE or FALSE. In computing, these two states are represented by the binary digits 1 (true) and 0 (false).
Boolean logic is named after the English mathematician George Boole (1815–1864), who first described this system of logic in his 1854 book The Laws of Thought. Boole showed that logical reasoning could be expressed using mathematical symbols and operations — an idea that would eventually become the foundation of all digital computing.
| Boolean Value | Binary | Meaning |
|---|---|---|
| TRUE | 1 | On / Yes / High |
| FALSE | 0 | Off / No / Low |
Computers are built from billions of tiny electronic switches called transistors. Each transistor can be in one of two states — on or off — which maps directly to the Boolean values 1 and 0.
All operations a computer performs — from adding numbers to displaying images — are ultimately carried out by combining these simple on/off switches using Boolean logic.
Key reasons Boolean logic matters:
IF statement in a program relies on Boolean conditions evaluating to true or false.There are three basic Boolean operations from which all other operations can be built:
These three operations are sometimes called the primary logic gates because every other logic gate (such as XOR, NAND and NOR) can be constructed from combinations of NOT, AND and OR.
| Operation | Symbol | Description |
|---|---|---|
| NOT | ¬ or overline (A̅) | Inverts the input |
| AND | ∧ or · | True only if both inputs are true |
| OR | ∨ or + | True if at least one input is true |
A logic gate takes one or more inputs and produces a single output. Inputs and outputs are always either 0 or 1.
We can represent the behaviour of a logic gate using a truth table — a table that lists every possible combination of inputs along with the resulting output. You will study truth tables in detail in a later lesson.
In programming languages, Boolean logic appears everywhere:
True or False in Python, true or false in Java and JavaScript).if statements, while loops and for loops are Boolean expressions.and, or and not combine conditions.For example, in Python:
age = 16
has_ticket = True
if age >= 16 and has_ticket:
print("You may enter.")
Here, the condition age >= 16 and has_ticket is a Boolean expression that evaluates to True or False.
At the hardware level, Boolean operations are performed by logic gates — electronic circuits built from transistors.
Logic gates are drawn using standard symbols in circuit diagrams.
You will learn the specific symbols for each gate in later lessons.
Logic gates are combined to build increasingly complex circuits:
| Term | Definition |
|---|---|
| Boolean | A data type or value that can only be TRUE (1) or FALSE (0) |
| Logic gate | An electronic circuit that performs a Boolean operation |
| Truth table | A table showing all possible input combinations and their outputs |
| Input | A value fed into a logic gate (0 or 1) |
| Output | The result produced by a logic gate (0 or 1) |
| Boolean expression | An algebraic expression using Boolean operators (NOT, AND, OR, etc.) |
For your GCSE Computer Science exam (AQA / OCR), you need to be able to:
Exam Tip: When answering questions about Boolean logic, always show your working by drawing a truth table. Even if the question does not explicitly ask for one, truth tables help you verify your answer and can earn method marks.