Logic Gates and Boolean Algebra Revision Notes | A Level AQA Physics
An XOR (exclusive OR) gate outputs 1 when its inputs are different and 0 when they are the same, either both 0 or both 1. Free notes and 14 questions answered.
Logic Gates and Boolean Algebra is part of Digital signal processing (A-level only) in A Level AQA Physics.
7 min
Reading time
34
Lessons in this topic
A Level AQA
Pathway
Reviewed by Revise Right
Content review
What this lesson covers
An XOR (exclusive OR) gate outputs 1 when its inputs are different and 0 when they are the same, either both 0 or both 1. Free notes and 14 questions answered.
State the Boolean notation for NOT, AND, and OR operations and relate each to its corresponding logic gate
Construct and complete truth tables for NOT, AND, OR, NAND, NOR, and XOR gates
Apply Boolean algebra to write expressions for the output of combined logic gate circuits
Analyse multi-gate circuits by tracing logic levels through each stage
Key ideas to keep in view
Use this lesson to stay inside Digital signal processing (A-level only) while connecting the detail back to the wider Electronics (A-level only) topic.
Boolean algebra: A mathematical system using only two values, 0 (false) and 1 (true), used to describe and simplify the behaviour of logic circuits.
Logic gate: A digital building block that takes one or more binary inputs and produces a single binary output according to a fixed logical rule.
Truth table: A table listing every possible combination of inputs to a logic circuit and the corresponding output for each combination.
Boolean expression: An algebraic statement using Boolean operators (NOT, AND, OR) that describes the output of a logic gate or circuit in terms of its inputs.
Revision notes
Read the core explanations from Logic Gates and Boolean Algebra before testing yourself from memory.
1. Why Logic Gates Matter
Every decision a computer makes — from checking a password to controlling a traffic light — comes down to one question: is this signal on or off? Logic gates are the physical components that answer that question, and Boolean algebra is the language we use to describe what they do.
At A Level, you treat each gate as a building block: you need to know what it does, not how it is built internally from transistors. Think of a gate the way you think of a function in maths — you feed in inputs, a rule is applied, and you get an output.
2. The Language of Boolean Algebra
Boolean algebra uses three core operations, each with its own notation. The AQA specification requires you to recognise and use all three precisely.
The NOT operation flips the bit. It is the simplest gate — one input, one output, always the opposite value. In circuit diagrams it appears as a triangle with a small circle (bubble) at the output.
Picture a series circuit with two switches: the lamp only lights when switch A and switch B are both closed. That is exactly the AND rule. The dot notation ($A \cdot B$) mirrors multiplication — and notice that $1 \times 1 = 1$ while anything multiplied by 0 gives 0, which matches the gate's behaviour perfectly.
The plus sign in $A + B$ can look like ordinary addition, but remember: in Boolean algebra $1 + 1 = 1$, not 2. The OR gate asks 'is there any 1 present?' rather than counting how many.
Operation
Boolean notation
Plain English rule
Output is 1 when...
NOT
$\overline{A}$
not A
A = 0
AND
$A \cdot B$
A and B
both A = 1 and B = 1
OR
$A + B$
A or B
at least one input = 1
3. Truth Tables for the Three Core Gates
A truth table is the definitive way to specify a gate's behaviour. For $n$ inputs there are $2^n$ rows — so a two-input gate has four rows, covering every possible combination of 0s and 1s.
Here are the truth tables for NOT, AND, and OR. Study the pattern in the output column for each — these patterns are what you need to recall instantly in an exam.
A
$\overline{A}$ (NOT)
0
1
1
0
A
B
$A \cdot B$ (AND)
$A + B$ (OR)
0
0
0
0
0
1
0
1
1
0
0
1
1
1
1
1
Notice the AND column: only the very last row gives a 1. The OR column: only the very first row gives a 0. These two patterns are the quickest way to check your work under exam conditions.
4. NAND, NOR, and XOR Gates
Beyond the three core gates, AQA expects you to handle NAND, NOR, and XOR as additional building blocks. Each one is defined by its truth table, and each has a Boolean expression derived from the core operations.
A NAND gate is an AND gate followed by a NOT: its output is $\overline{A \cdot B}$. The output is 0 only when both inputs are 1 — the exact opposite of AND. A NOR gate is an OR gate followed by a NOT: its output is $\overline{A + B}$. The output is 1 only when both inputs are 0.
An XOR gate (exclusive OR) outputs 1 when the inputs are different. Its Boolean expression is $A \oplus B$. When both inputs are the same (both 0 or both 1) the output is 0.
A
B
NAND $\overline{A \cdot B}$
NOR $\overline{A + B}$
XOR $A \oplus B$
0
0
1
1
0
0
1
1
0
1
1
0
1
0
1
1
1
0
0
0
A useful memory hook: NAND and NOR are the 'inverse' gates — their outputs are the complements of AND and OR respectively. XOR is the 'difference detector' — it fires when the inputs disagree.
5. Writing Boolean Expressions for Combined Circuits
Real circuits chain gates together. The skill here is reading the circuit from left to right, writing the Boolean expression at the output of each gate in turn, and building up to the final output expression.
Think of it like substituting into a function: each gate's output becomes the input expression for the next gate. Work one gate at a time and you will not lose track.
Worked example: Writing the Boolean Expression for a Two-Gate Circuit
A circuit has inputs A and B. They feed into an AND gate whose output is labelled P. P and a third input C then feed into an OR gate to give the final output Q. Write the Boolean expression for Q.
Gate 1 is AND with inputs A and B. — Always start at the inputs and work towards the output.
$P = A \cdot B$ — The AND gate gives the product of its two inputs.
Gate 2 is OR with inputs P and C. — P is now treated as a single variable feeding the next gate.
$Q = P + C = (A \cdot B) + C$ — Replace P with its full expression. Brackets clarify the order of operations.
$Q = (A \cdot B) + C$ — Q = 1 whenever both A and B are 1, OR whenever C is 1 (or both conditions hold).
Answer: $Q = (A \cdot B) + C$
Once you have the Boolean expression, you can construct the full truth table by evaluating the expression for all eight possible combinations of A, B, and C (since there are three inputs, $2^3 = 8$ rows are needed).
6. Constructing a Full Truth Table for a Combined Circuit
With the expression $Q = (A \cdot B) + C$ in hand, the truth table is built column by column. First list all input combinations systematically, then evaluate any intermediate expressions (like $A \cdot B$), and finally compute the output.
Worked example: Completing the Truth Table for Q = (A · B) + C
Construct the full truth table for $Q = (A \cdot B) + C$ with inputs A, B, and C.
With 3 inputs there are $2^3 = 8$ rows.
A: 0 0 0 0 1 1 1 1
B: 0 0 1 1 0 0 1 1
C: 0 1 0 1 0 1 0 1 — Cycle the rightmost input fastest (C alternates every row), then B, then A. This systematic approach guarantees no row is missed.
Row 1: 0·0=0, Row 2: 0·0=0, Row 3: 0·1=0, Row 4: 0·1=0,
Row 5: 1·0=0, Row 6: 1·0=0, Row 7: 1·1=1, Row 8: 1·1=1 — AND is only 1 when both inputs are 1 — only rows 7 and 8 qualify here.
Row 1: 0+0=0, Row 2: 0+1=1, Row 3: 0+0=0, Row 4: 0+1=1,
Row 5: 0+0=0, Row 6: 0+1=1, Row 7: 1+0=1, Row 8: 1+1=1 — OR is 1 whenever at least one of its inputs is 1. Apply this to each row using the intermediate column.
Q: 0, 1, 0, 1, 0, 1, 1, 1 — Q = 0 only in rows 1, 3, and 5 — where both A·B = 0 and C = 0.
Answer: Q outputs: 0, 1, 0, 1, 0, 1, 1, 1 for the eight input combinations in order.
7. Tracing Logic Levels Through a Circuit
Some exam questions give you a circuit diagram with specific input values and ask you to determine the output. The method is the same as building a Boolean expression, but you substitute numbers at each stage rather than letters.
Earlier we built the expression $Q = (A \cdot B) + C$ from a two-gate circuit. Now consider a slightly more complex circuit where a NOT gate is added: input A passes through a NOT gate to give $\overline{A}$, and then $\overline{A}$ and B feed into an AND gate to give output $P = \overline{A} \cdot B$.
Worked example: Tracing Logic Levels: NOT then AND
A circuit has input A passing through a NOT gate, then the NOT output and input B feed into an AND gate. Given A = 1 and B = 1, find the output P.
$P = \overline{A} \cdot B$ — The NOT gate acts on A first; its output then feeds the AND gate alongside B.
$\overline{A} = \overline{1} = 0$ — NOT inverts the input: 1 becomes 0.
$P = \overline{A} \cdot B = 0 \cdot 1 = 0$ — AND requires both inputs to be 1. Since $\overline{A} = 0$, the output is 0 regardless of B.
$P = 0$ — Even though B = 1, the NOT gate on A means the AND gate never sees two 1s simultaneously when A = 1.
Answer: $P = 0$
This pattern — a NOT gate feeding into an AND or OR gate — appears frequently in exam circuits. Always resolve the NOT first, then carry that value forward to the next gate.
8. Exam Technique and Common Mistakes
Logic gate questions are reliable mark-earners if you follow a disciplined method. The most common source of lost marks is not a gap in knowledge — it is a procedural slip under time pressure.
When an exam question asks you to 'describe' the behaviour of a gate, state the rule in terms of inputs and output without using 'because' — for example: 'The output is 1 only when both input A and input B are 1.' When asked to 'explain', link the Boolean expression to the truth table outcome: 'Because $A \cdot B = 1$ only when both A and B equal 1, the AND gate produces a high output only under that condition.'
Logic gates and Boolean algebra together form the foundation of all digital electronics at A Level: every gate is a building block described by a Boolean expression, every circuit is a combination of those blocks, and every combination can be fully specified by a truth table — which is exactly what the AQA specification requires you to demonstrate.
Sources and content standards
Published by Revise Right. Use the official specification reference to check the requirements for your course.
An XOR (exclusive OR) gate outputs 1 when its inputs are different and 0 when they are the same, either both 0 or both 1. Its Boolean expression is A ⊕ B, and it acts as a difference detector.
What is the difference between NAND and NOR gates?
A NAND gate is an AND gate followed by a NOT, so its output is 0 only when both inputs are 1, the exact opposite of AND. A NOR gate is an OR gate followed by a NOT, so its output is 1 only when both inputs are 0.
What does a NOT gate do?
A NOT gate inverts its single input: if A = 1 the output is 0, and if A = 0 the output is 1. Its Boolean notation is A with a bar over it, read as 'not A', and in circuit diagrams it appears as a triangle with a small circle, or bubble, at the output.
What does an AND gate do?
An AND gate gives an output of 1 only when both inputs A and B are 1; in all other cases the output is 0. It is written A · B, and works like a series circuit with two switches, where the lamp only lights when both switches are closed.
What are the Boolean expressions for AND, OR and NOT?
In Boolean algebra, NOT A is written as A with a bar over it, AND is written A · B and OR is written A + B. AND gives 1 only when both inputs are 1, OR gives 1 when at least one input is 1, and NOT inverts the input.
How do you write a Boolean expression for a logic circuit?
A Boolean expression for a logic circuit is written by reading the circuit from left to right and writing the expression at each gate's output in turn. If A and B feed an AND gate giving P = A · B, and P and C feed an OR gate, the output is Q = (A · B) + C.
How many rows does a truth table have?
A truth table has 2ⁿ rows for n inputs, so a two-input gate has four rows and a three-input circuit has 2³ = 8 rows. List the inputs systematically, cycling the rightmost input fastest, so that no combination is missed.
What does an OR gate do?
An OR gate gives an output of 1 when at least one of its inputs A or B is 1, and 0 only when both inputs are 0. It is written A + B, but in Boolean algebra 1 + 1 = 1, not 2, because the gate asks whether any 1 is present rather than counting them.
Why does 1 + 1 = 1 in Boolean algebra?
In Boolean algebra 1 + 1 = 1 because the plus sign means OR, not ordinary addition. An OR gate asks whether there is any 1 present rather than counting how many, so when both inputs are 1 the output is simply 1.
How do you complete a truth table for Q = (A · B) + C?
A truth table for Q = (A · B) + C has 2³ = 8 rows; list the inputs systematically, add an intermediate column for A · B, then OR it with C. The output column in order is 0, 1, 0, 1, 0, 1, 1, 1, so Q is 0 only when A · B = 0 and C = 0.
How do you trace logic levels through a circuit?
Logic levels are traced through a circuit by working from the inputs to the output one gate at a time, substituting numbers at each stage. For A passing through a NOT gate into an AND gate with B, A = 1 gives NOT A = 0, so the AND output is 0 · 1 = 0 regardless of B.
How do you list the inputs in a truth table?
Truth table inputs are listed systematically so no row is missed: the rightmost input cycles fastest, alternating every row, then the next input, and so on. For three inputs this gives eight rows, with A as 0 0 0 0 1 1 1 1, B as 0 0 1 1 0 0 1 1 and C as 0 1 0 1 0 1 0 1.
How can you quickly check AND and OR columns in a truth table?
AND and OR columns in a two-input truth table can be checked quickly by their patterns: the AND column has a 1 only in the very last row, where both inputs are 1, and the OR column has a 0 only in the very first row, where both inputs are 0.
Why is the AND gate written like multiplication?
The AND gate is written A · B, like multiplication, because Boolean AND behaves like multiplication of 0s and 1s: 1 × 1 = 1, while anything multiplied by 0 gives 0. That matches an AND gate, whose output is 1 only when both inputs are 1.