Skip to main content
WalesComputer ScienceSyllabus dot point

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.

Generated by Claude Opus 4.88 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this topic is asking
  2. The Boolean operators
  3. Truth tables
  4. Logic gates
  5. Simplifying logic expressions
  6. Try this

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: 0,000,0\to0; 0,100,1\to0; 1,001,0\to0; 1,111,1\to1. The OR table is: 0,000,0\to0; 0,110,1\to1; 1,011,0\to1; 1,111,1\to1. The NOT table is: 010\to1; 101\to0.

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 Q=NOT AQ = \text{NOT } A when A=0A = 0 and when A=1A = 1. [1 mark]

  • Cue. When A=0A=0, Q=1Q=1; when A=1A=1, Q=0Q=0.

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 Q=A AND BQ = A \text{ AND } B, and state what AND, OR and NOT each do.
Show worked answer →

A Unit 1 logic question. The truth table for Q=A AND BQ = A \text{ AND } B has four rows: when A=0,B=0A = 0, B = 0 then Q=0Q = 0; A=0,B=1A = 0, B = 1 then Q=0Q = 0; A=1,B=0A = 1, B = 0 then Q=0Q = 0; A=1,B=1A = 1, B = 1 then Q=1Q = 1 (2 marks for a fully correct table, 1 mark if mostly correct). AND gives 11 (true) only when both inputs are 11 (1 mark). OR gives 11 when at least one input is 11, 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 11 when only one input is 11.

WJEC-style Unit 13 marksDraw or describe a logic circuit for Q=(A AND B) OR (NOT C)Q = (A \text{ AND } B) \text{ OR } (\text{NOT } C) 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 AA and BB and outputs A AND BA \text{ AND } B (1 mark). A NOT gate takes input CC and outputs NOT C\text{NOT } C (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 QQ (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

Sources & how we know this