StudyVault
Home Unit Overview Exam Technique Revision Techniques ← Previous Lesson Next Lesson →

← Back to Dashboard

Overlay:
0:00 / 0:00 Narration generated using AI text-to-speech.

Boolean Logic and Truth Tables

What Is Boolean Logic?

Boolean logic underpins all digital computing. Inside a processor, every decision reduces to combinations of 1s and 0s. Logic gates are the physical building blocks that implement Boolean operations in hardware — they take binary inputs and produce a binary output according to a defined rule.

You must know four logic gates for your exam: NOT, AND, OR and XOR. A truth table is the standard way to show how any gate or combination of gates behaves — it lists every possible set of input values and the resulting output.

The Four Logic Gates

The NOT gate has a single input and inverts it. If the input is 1, the output is 0; if the input is 0, the output is 1. It is sometimes called an inverter. In Boolean notation, NOT A is written with an overbar: Ā.

The AND gate outputs 1 only when every input is 1. If any input is 0, the output is 0. In Boolean notation, A AND B is written as A · B (a dot). Think of it as: both conditions must be true.

The OR gate outputs 1 when at least one input is 1. It outputs 0 only when every input is 0. In Boolean notation, A OR B is written as A + B (a plus sign). Think of it as: at least one condition is true.

The XOR gate (exclusive OR) outputs 1 when exactly one of its inputs is 1 — but not when both are 1. This is what makes XOR different from OR: OR is true when one OR both inputs are true; XOR is true when one input is true but NOT both. In Boolean notation, A XOR B is written as A ⊕ B.

Key Fact

XOR outputs 1 only when inputs differ (one is 0, the other is 1). When both inputs are the same (both 0 or both 1), XOR outputs 0. This is the key distinction from OR, which outputs 1 when both inputs are 1.

NOT (single input):
A=0 → Output=1  |  A=1 → Output=0

AND:
A=0, B=0 → 0  |  A=0, B=1 → 0  |  A=1, B=0 → 0  |  A=1, B=1 → 1

OR:
A=0, B=0 → 0  |  A=0, B=1 → 1  |  A=1, B=0 → 1  |  A=1, B=1 → 1

XOR:
A=0, B=0 → 0  |  A=0, B=1 → 1  |  A=1, B=0 → 1  |  A=1, B=1 → 0

The XOR row is the one to practise. AND and OR are more intuitive; XOR’s A=1,B=1 → 0 is the row students most often get wrong.

Boolean Notation

Your exam uses a specific set of symbols for Boolean expressions. You must recognise and use them correctly:

  • A · B means A AND B (a dot between variables).
  • A + B means A OR B (a plus sign between variables).
  • A ⊕ B means A XOR B (a circled plus sign).
  • Ā (A with an overbar above it) means NOT A.

So the expression (A AND B) OR (NOT C) is written as: A · B + C̄. Always evaluate brackets first, just as in ordinary arithmetic.

Truth Tables with Three Inputs

When a circuit has three inputs (A, B, C), the truth table needs 23 = 8 rows to cover every combination. List the input columns in a consistent binary counting pattern so no combination is missed:

Expression: (A AND B) OR (NOT C) — written as A · B + C̄

Add an intermediate column for A · B, then a column for NOT C, then combine with OR for the final output.

Row 1: A=0,B=0,C=0 — A·B=0, NOT C=1, Output=1
Row 2: A=0,B=0,C=1 — A·B=0, NOT C=0, Output=0
Row 3: A=0,B=1,C=0 — A·B=0, NOT C=1, Output=1
Row 4: A=0,B=1,C=1 — A·B=0, NOT C=0, Output=0
Row 5: A=1,B=0,C=0 — A·B=0, NOT C=1, Output=1
Row 6: A=1,B=0,C=1 — A·B=0, NOT C=0, Output=0
Row 7: A=1,B=1,C=0 — A·B=1, NOT C=1, Output=1
Row 8: A=1,B=1,C=1 — A·B=1, NOT C=0, Output=1

Notice that adding intermediate columns makes it straightforward to avoid errors. The output is 0 only when A·B=0 AND C=1 (rows 2, 4, 6).

Key Fact

A truth table for n inputs has 2n rows. Two inputs: 4 rows. Three inputs: 8 rows. Always list input combinations in binary counting order (000, 001, 010, 011, 100, 101, 110, 111) to guarantee every combination is covered. Add intermediate columns for complex expressions.

Logic Circuits and Expressions

A logic circuit diagram shows gates connected by wires. Your exam may ask you to convert between a Boolean expression and a circuit diagram, or to complete a truth table for a given circuit. Work methodically: label the output of each gate as an intermediate value, then trace each row of the truth table through the circuit gate by gate.

Conversely, given a circuit diagram, write the expression by reading the gates from inputs to output. The output of each gate becomes the input expression for the next. Brackets group gates that feed into a later gate. This skill requires practise — draw example circuits and write their expressions until the pattern becomes automatic.

Practice Questions

Test yourself on this lesson. Pick a question, write your answer, then get it marked.

AI feedback
AI feedback is guidance, not a final exam mark. If you disagree, your teacher's view is always the tie-breaker.
← Back to unit
Video

© 2026 StudyVault · About · FAQ · Copyright & IP · Privacy · Disclaimers

StudyVault Education Ltd · registered in England and Wales, company no. 17490559 · 71–75 Shelton Street, London WC2H 9JQ