What do the AND, OR and NOT logic gates do, and how do you build and read a truth table?
The logic operators AND, OR and NOT, their logic gates and truth tables, and combining them in simple logic circuits and Boolean expressions of up to three inputs.
An Eduqas GCSE Computer Science answer on the AND, OR and NOT logic gates and their truth tables, and how to build and evaluate simple logic circuits and Boolean expressions of up to three inputs.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
Eduqas wants you to know the three logic operators AND, OR and NOT, their logic gates and truth tables, and to combine them in simple logic circuits and Boolean expressions of up to three inputs. Completing a truth table for a given expression is the recurring Component 1 question.
The three logic gates
The single-gate truth tables, with inputs and :
| AND | OR | NOT | ||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 |
Truth tables for combined expressions
Reading and drawing logic circuits
A logic circuit is the gates wired together to carry out a Boolean expression. To find the output of a circuit for given inputs, work through it gate by gate, writing the value on each wire, until you reach the output. To draw a circuit from an expression, place a gate for each operator and feed the inputs in, handling brackets and NOTs first, exactly as you would when evaluating the expression.
Why logic gates matter
Logic gates are the physical building blocks of a processor. The ALU described in the hardware topic carries out its arithmetic and comparisons using circuits built from AND, OR and NOT gates, and the same gates combine to store and move data. Understanding the three basic gates and how they combine in expressions is therefore the foundation for understanding how a computer makes decisions and performs calculations at the lowest level.
Try this
Q1. State when an AND gate outputs . [1 mark]
- Cue. Only when both inputs are .
Q2. State how many rows a truth table has for an expression with three inputs. [1 mark]
- Cue. rows ().
Q3. Give the output of when and . [1 mark]
- Cue. , and NOT of that is .
Exam-style practice questions
Practice questions written in the style of WJEC Eduqas exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
Eduqas Component 1, 20224 marksComplete a truth table for the Boolean expression Q = A AND (NOT B), for all combinations of A and B.Show worked answer →
List all four input combinations of A and B (00, 01, 10, 11), work out NOT B, then AND it with A.
A=0, B=0: NOT B = 1, A AND 1 = 0. A=0, B=1: NOT B = 0, A AND 0 = 0. A=1, B=0: NOT B = 1, A AND 1 = 1. A=1, B=1: NOT B = 0, A AND 0 = 0.
So Q is 1 only when A=1 and B=0. Markers award marks for the NOT B column and the final Q column. A common error is forgetting to invert B first.
Eduqas Component 1, 20233 marksState the output of an AND gate, an OR gate and a NOT gate, describing when each gives an output of 1.Show worked answer →
AND (1 mark): output is 1 only when both inputs are 1; otherwise 0.
OR (1 mark): output is 1 when at least one input is 1; only 0 when both inputs are 0.
NOT (1 mark): has one input and inverts it, so an input of 0 gives 1 and an input of 1 gives 0.
Markers reward the precise condition for a 1 output from each gate. Saying AND outputs 1 when "either" input is 1 confuses it with OR.
Related dot points
- Computational thinking: abstraction, decomposition and algorithmic thinking, and how these techniques are used to break down and solve a problem.
An Eduqas GCSE Computer Science answer on computational thinking: abstraction (removing unnecessary detail), decomposition (breaking a problem into smaller parts) and algorithmic thinking (working out the steps), with a worked example of applying all three.
- Designing, expressing and tracing algorithms using pseudocode and flowcharts, and using a trace table to follow an algorithm step by step.
An Eduqas GCSE Computer Science answer on designing and expressing algorithms in pseudocode and flowcharts, the standard flowchart symbols, and using a trace table to follow an algorithm step by step and find its output.
- Variables and constants, the common data types (integer, real, Boolean, character, string), and the arithmetic, relational and logical operators used in programs.
An Eduqas GCSE Computer Science answer on variables and constants, the common data types (integer, real, Boolean, character, string), and the arithmetic, relational and logical operators, including integer division and modulus.
- The purpose of the CPU, the fetch-decode-execute cycle, the von Neumann architecture, and the function of the common CPU components and registers (ALU, control unit, PC, MAR, MDR, accumulator).
An Eduqas GCSE Computer Science answer on the purpose of the CPU, the von Neumann architecture, the fetch-decode-execute cycle, and the function of the ALU, control unit and the named registers (Program Counter, MAR, MDR and accumulator).
- The three programming constructs: sequence, selection (if and nested if) and iteration (count-controlled and condition-controlled loops), and when to use each.
An Eduqas GCSE Computer Science answer on the three programming constructs: sequence, selection (if, else, nested if) and iteration (count-controlled for loops and condition-controlled while loops), with worked pseudocode for each.
Sources & how we know this
- WJEC Eduqas GCSE Computer Science specification (from 2016) — Eduqas (2020)