How do Boolean logic, logic gates and truth tables describe and simplify the operations inside a processor?
Use Boolean algebra, logic gates and truth tables to represent and simplify logical operations.
A focused answer to WJEC A-Level Computer Science Unit 1 logical operations, covering the logic gates and their truth tables, Boolean expressions and identities, and simplifying a logic circuit.
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
WJEC wants you to know the logic gates and their truth tables, to write and evaluate Boolean expressions, and to simplify them using Boolean identities. Logic is the bridge between binary data and the physical circuits of the processor, so this topic links data representation to hardware. Expect a truth-table question and a simplification question on most AS papers, both of which reward careful, systematic working.
The answer
The logic gates
Each gate has a standard symbol and a truth table. NAND and NOR are called universal gates because any logic function can be built from NAND gates alone, or from NOR gates alone, which matters when manufacturing a chip from a single gate type.
Truth tables
A truth table lists every possible combination of the inputs and the resulting output. For n inputs there are 2 to the power n rows: two inputs give four rows, three inputs give eight. Building a truth table for a compound expression means adding a column for each intermediate part and working left to right, evaluating the innermost brackets first.
Boolean algebra and identities
De Morgan's laws are the workhorse of simplification because they let you push a NOT through a bracket, turning an AND into an OR and vice versa. They are also how a circuit built only from NAND or NOR gates is derived.
Simplifying a circuit
Fewer gates means lower cost, lower power and faster operation, so simplification is not just algebra for its own sake: it is how real circuits are made efficient.
Examples in context
- Example 1. A half adder built from gates
- Adding two single bits needs a sum and a carry. The sum is A XOR B (1 when the bits differ) and the carry is A AND B (1 only when both are 1). This half adder is the smallest piece of the arithmetic unit, and it shows how the XOR and AND gates combine to do real binary arithmetic inside the processor.
- Example 2. A safety interlock on a machine
- A press should only operate when a guard is closed (G) AND a start button is pressed (S) AND an emergency stop is not active (NOT E). The control logic is G AND S AND (NOT E), a direct Boolean expression that a small circuit implements, illustrating how logic gates enforce real-world safety rules.
- Example 3. Cutting gate count to save cost
- A design originally uses the expression (A AND B) OR (A AND C), which needs two AND gates and an OR gate. The distributive law rewrites it as A AND (B OR C), needing one AND gate and one OR gate. On a chip with millions of such blocks, this kind of simplification reduces silicon area, power draw and propagation delay, which is why examiners stress it.
Try this
Q1. Write down the truth table output column for A NAND B for the input rows 00, 01, 10, 11. [2 marks]
- Cue. NAND is NOT AND, so the outputs are 1, 1, 1, 0.
Q2. Use De Morgan's law to rewrite NOT (A OR B). [1 mark]
- Cue. (NOT A) AND (NOT B).
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 20194 marksDraw the truth table for the Boolean expression Q = (A AND B) OR (NOT A) for all combinations of A and B.Show worked answer →
Build the table column by column, evaluating the bracketed parts before combining them.
A B | A AND B | NOT A | Q = (A AND B) OR (NOT A)
0 0 | 0 | 1 | 1
0 1 | 0 | 1 | 1
1 0 | 0 | 0 | 0
1 1 | 1 | 0 | 1
Q is 1 in every row except A = 1, B = 0.
Markers reward all four input rows present, the correct intermediate columns for A AND B and NOT A, and the correct final output column.
WJEC 20213 marksSimplify the Boolean expression A OR (A AND B) and name the law used.Show worked answer →
Apply a standard Boolean identity rather than expanding the brackets.
The expression A OR (A AND B) simplifies to A. This is the absorption law: if A is true the whole expression is true regardless of B, and if A is false then A AND B is also false, so the result equals A.
A truth table confirms it: the output column for A OR (A AND B) is identical to the column for A.
Markers reward the simplified answer A, naming the absorption law, and a correct justification by identity or truth table.
Related dot points
- Represent numbers in binary, hexadecimal and two's complement, perform binary arithmetic, and represent characters, sound and images as binary data.
A focused answer to WJEC A-Level Computer Science Unit 1 data representation, covering binary and hexadecimal, two's complement, binary arithmetic and shifts, and how characters, sound and images are stored as binary.
- Describe the von Neumann architecture, the components of the CPU, the fetch-execute cycle, memory and the storage hierarchy.
A focused answer to WJEC A-Level Computer Science Unit 1 hardware, covering the von Neumann architecture, the CPU components and registers, the fetch-execute cycle, primary and secondary storage, and factors affecting performance.
- Design algorithms in pseudocode, apply the standard searching and sorting algorithms, and compare algorithm efficiency.
A focused answer to WJEC A-Level Computer Science Unit 1 algorithms, covering algorithm design and pseudocode, linear and binary search, bubble, insertion and merge sort, and comparing efficiency.
- Explain the principles of programming: data types, the three control structures, procedures and functions, parameter passing and recursion.
A focused answer to WJEC A-Level Computer Science Unit 1 principles of programming, covering data types and variables, sequence, selection and iteration, procedures, functions and parameter passing, and recursion.
- Describe and use arrays, records, lists, stacks, queues, trees and hash tables, and explain their operations and uses.
A focused answer to WJEC A-Level Computer Science Unit 1 data structures, covering arrays and records, the abstract data types stack and queue, lists, binary trees and hash tables, and when each is the right choice.