What are the logic operators AND, OR and NOT, how do truth tables work, and what do logic gates do?
Boolean logic using the AND, OR and NOT operators, constructing truth tables, the logic gates, and simplifying simple logic expressions.
A focused answer to the WJEC GCSE Computer Science Unit 1 content on logical operations, covering Boolean logic with the AND, OR and NOT operators, constructing truth tables, the matching logic gates, and simplifying simple logic expressions, with worked examples.
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 topic is asking
WJEC wants you to know Boolean logic with the AND, OR and NOT operators, how to build truth tables, what the logic gates do, and how to simplify simple logic expressions. This is part of the Algorithms and programming principles content (Logical operations) in Unit 1 of WJEC GCSE Computer Science (3500).
The Boolean operators
Truth tables
For example, the AND table is: ; ; ; . The OR table is: ; ; ; . The NOT table is: ; .
Logic gates
Simplifying logic expressions
Try this
Q1. State when an AND gate outputs 1. [1 mark]
- Cue. Only when both of its inputs are 1.
Q2. Complete the output for when and when . [1 mark]
- Cue. When , ; when , .
Exam-style practice questions
Practice questions written in the style of WJEC exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
WJEC-style Unit 14 marksComplete a truth table for the expression , and state what AND, OR and NOT each do.Show worked answer →
A Unit 1 logic question. The truth table for has four rows: when then ; then ; then ; then (2 marks for a fully correct table, 1 mark if mostly correct). AND gives (true) only when both inputs are (1 mark). OR gives when at least one input is , and NOT reverses its single input (0 becomes 1, 1 becomes 0) (1 mark for OR and NOT). Markers reward a correct AND table and correct descriptions of the operators. A common error is to fill the AND table like an OR, giving when only one input is .
WJEC-style Unit 13 marksDraw or describe a logic circuit for and explain how the gates connect.Show worked answer →
A Unit 1 logic-circuit question. The circuit needs three gates. An AND gate takes inputs and and outputs (1 mark). A NOT gate takes input and outputs (1 mark). An OR gate takes the output of the AND gate and the output of the NOT gate as its two inputs, and its output is (1 mark). Markers reward the correct three gates connected so the AND and NOT outputs feed the OR gate. A common error is to feed the raw inputs into the OR gate instead of the outputs of the AND and NOT gates, or to use the wrong gate symbols.
Related dot points
- The three programming constructs (sequence, selection and iteration), the use of variables and constants, and arithmetic, relational and logical operators.
A focused answer to the WJEC GCSE Computer Science Unit 1 content on programming constructs, covering sequence, selection and iteration (including IF statements and FOR and WHILE loops), the difference between variables and constants, and arithmetic, relational and logical operators with worked examples.
- The purpose and main components of the CPU (the ALU, the control unit and registers) and the von Neumann stored-program architecture.
A focused answer to the WJEC GCSE Computer Science Unit 1 content on the CPU and von Neumann architecture, covering the purpose of the CPU, the roles of the arithmetic logic unit, the control unit and registers, and the von Neumann stored-program model where instructions and data share the same memory.
- Adding two binary numbers using the carry rules, the meaning of overflow, and using arithmetic (binary) shifts to multiply and divide by powers of two.
A focused answer to the WJEC GCSE Computer Science Unit 1 content on binary arithmetic, covering adding two binary numbers with the carry rules, the meaning and cause of overflow, and using left and right arithmetic shifts to multiply and divide a binary number by powers of two.
- Computational thinking through decomposition and abstraction, what an algorithm is, and expressing algorithms using flowcharts and pseudocode.
A focused answer to the WJEC GCSE Computer Science Unit 1 content on computational thinking and algorithms, covering decomposition and abstraction, what an algorithm is, and how algorithms are expressed using flowcharts (with the standard symbols) and pseudocode, with worked examples.
- The use of subprograms (procedures and functions) and parameters, and the benefits of a modular, structured approach to programming.
A focused answer to the WJEC GCSE Computer Science Unit 1 content on subprograms and program structure, covering procedures and functions, the use of parameters, the difference between a procedure and a function, and the benefits of a modular, structured approach to writing programs.