Skip to content

You are viewing a free preview of this lesson.

Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.

Introduction to Boolean Logic

Introduction to Boolean Logic

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.


What Is Boolean Logic?

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

Why Is Boolean Logic Important in Computing?

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:

  • Processor design: The CPU uses millions of logic gates (physical implementations of Boolean operations) to process data.
  • Decision making: Every IF statement in a program relies on Boolean conditions evaluating to true or false.
  • Search engines: Boolean operators (AND, OR, NOT) are used to refine database and internet searches.
  • Circuit design: Engineers use Boolean algebra to design and simplify electronic circuits.

The Three Fundamental Operations

There are three basic Boolean operations from which all other operations can be built:

  1. NOT — inverts (negates) a single input
  2. AND — outputs true only when ALL inputs are true
  3. OR — outputs true when AT LEAST ONE input is true

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.

Quick Summary Table

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

Inputs and Outputs

A logic gate takes one or more inputs and produces a single output. Inputs and outputs are always either 0 or 1.

  • A NOT gate has 1 input and 1 output.
  • AND and OR gates each have 2 inputs and 1 output.

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.


Boolean Logic in Programming

In programming languages, Boolean logic appears everywhere:

  • Variables can be of Boolean type (True or False in Python, true or false in Java and JavaScript).
  • Conditions in if statements, while loops and for loops are Boolean expressions.
  • Logical operators such as 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.


Boolean Logic in Hardware

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:

  • Adders — circuits that add binary numbers together
  • Flip-flops — circuits that store a single bit of data (used in memory)
  • Multiplexers — circuits that select between multiple inputs
  • ALU (Arithmetic Logic Unit) — the part of the CPU that performs calculations and logical comparisons

Key Terminology

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.)

What You Need to Know for the Exam

For your GCSE Computer Science exam (AQA / OCR), you need to be able to:

  • Explain what Boolean logic is and why it is important in computing.
  • Identify and describe the three fundamental Boolean operations: NOT, AND and OR.
  • Recognise the additional gates: XOR, NAND and NOR.
  • Complete and construct truth tables for one- and two-input logic gates.
  • Write and interpret Boolean expressions.
  • Trace the output of simple logic circuits containing multiple gates.
  • Simplify Boolean expressions using Boolean algebra rules.

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.


Summary

  • Boolean logic uses two values: TRUE (1) and FALSE (0).
  • It was invented by George Boole in the 19th century.
  • The three fundamental operations are NOT, AND and OR.
  • All digital circuits in a computer are built from combinations of logic gates.
  • Boolean logic is essential for both hardware design and software programming.
  • You must be able to work with truth tables, Boolean expressions and logic circuits for your GCSE exam.