What do the logic gates do, and how does Boolean algebra describe and simplify a logic circuit?
Logic gates and Boolean algebra: AND, OR, NOT, NAND, NOR, XOR and XNOR gates, truth tables, Boolean expressions, and the laws of Boolean algebra including De Morgan's theorems.
A focused answer to WJEC A-Level Electronics logic gates and Boolean algebra, covering the AND, OR, NOT, NAND, NOR, XOR and XNOR gates, their truth tables and symbols, writing Boolean expressions, and the laws of Boolean algebra including De Morgan's theorems.
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
Logic gates are the alphabet of digital electronics, and Boolean algebra is the grammar. WJEC expects you to know the seven standard gates, their symbols and truth tables, write a Boolean expression from a circuit or specification, and apply the laws of Boolean algebra, including De Morgan's theorems, to manipulate and simplify expressions. Truth tables and De Morgan transformations are near-guaranteed exam content.
The answer
The seven gates
Truth tables and Boolean expressions
A truth table lists the output for every combination of inputs. Two inputs give four rows, three inputs give eight. The Boolean expression is read from the rows where the output is high: each such row becomes an AND term (a minterm), and the terms are ORed together to give a sum-of-products expression.
The laws of Boolean algebra
These laws, together with the commutative, associative and distributive rules, let you simplify an expression algebraically. Simplifying matters because fewer gates means a cheaper, faster, lower-power circuit.
De Morgan's theorems
Examples in context
- Example 1. An alarm that needs two conditions
- A safe should only unlock when both a key switch and a keypad are active, so the design uses an AND gate fed by the two inputs. The Boolean expression captures the requirement exactly, and the truth table confirms the output is high in just one of the four input combinations.
- Example 2. Building everything from NAND
- Because De Morgan lets any AND or OR be rewritten with inversions, a NAND gate can be wired to make a NOT, an AND or an OR. Manufacturers exploit this by selling chips of identical NAND gates, from which a whole logic system can be built, which is why NAND is called a universal gate.
- Example 3. A parity check
- A chain of XOR gates outputs high when an odd number of its inputs are high. Data links use this to add a parity bit, so the receiver can XOR the bits together and detect a single-bit error. The XOR's difference-detecting behaviour is exactly what makes parity work.
Try this
Q1. Write the truth table for a two-input NOR gate. [2 marks]
- Cue. Output is high only for inputs (0,0); it is low for (0,1), (1,0) and (1,1).
Q2. Use De Morgan's theorem to rewrite without the long bar. [2 marks]
- Cue. : change OR to AND and invert each variable.
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 Eduqas 20204 marksWrite the Boolean expression for a two-input NAND gate, draw its truth table, and use De Morgan's theorem to show it is equivalent to an OR gate with both inputs inverted.Show worked answer →
A two-input NAND gives a low output only when both inputs are high.
Boolean expression: .
Truth table: for inputs (A,B) = (0,0), (0,1), (1,0) the output is 1, and for (1,1) the output is 0.
De Morgan's theorem states . The right-hand side is an OR gate fed by the inverted inputs, so a NAND gate equals an OR of the complemented inputs.
Markers reward the NAND expression and truth table, and the correct De Morgan transformation.
WJEC Eduqas 20183 marksA two-input XOR gate is fed with signals A and B. State its Boolean expression and explain what its output detects.Show worked answer →
An XOR (exclusive-OR) gate outputs high only when its inputs differ.
Boolean expression: .
Its output is high when exactly one input is high and low when the inputs are equal, so it detects a difference between the two inputs. This makes it useful as a one-bit comparator and in adders and parity circuits.
Markers reward the XOR expression (either the symbol or the sum-of-products form) and the statement that it detects when the inputs differ.
Related dot points
- Combinational logic design: deriving a circuit from a truth table or specification, sum-of-products form, simplification with Karnaugh maps, and building any function from NAND gates only.
A focused answer to WJEC A-Level Electronics combinational logic design, covering deriving a circuit from a truth table, sum-of-products form, simplification using Karnaugh maps, the universality of the NAND gate, and the design process from specification to gates.
- Sequential logic and flip-flops: the difference between combinational and sequential logic, the SR latch, D-type and JK flip-flops, clocking, and using flip-flops to build counters and shift registers.
A focused answer to WJEC A-Level Electronics sequential logic, covering the difference between combinational and sequential logic, the SR latch, D-type and JK flip-flops, clocking and edge triggering, and how flip-flops are connected to make counters and shift registers.
- System synthesis: the systems approach, block diagrams, building a system from input, process and output sub-systems, and interfacing between blocks.
A focused answer to the WJEC A-Level Electronics core concept of system synthesis, covering the systems approach, three-block input-process-output diagrams, signal flow, interfacing between sub-systems, and how complex products are built up from standard building blocks.
- Microcontroller programming: flowcharts, sequence, selection and iteration, input and output instructions, time delays, subroutines, and translating a system specification into a program.
A focused answer to WJEC A-Level Electronics microcontroller programming, covering flowcharts, the program structures of sequence, selection and iteration, input and output instructions, time delays, subroutines, and turning a system specification into a working program.
- Analogue-to-digital conversion: sampling, the sampling rate and the Nyquist criterion, quantisation, resolution and the number of bits, and quantisation error.
A focused answer to WJEC A-Level Electronics analogue-to-digital conversion, covering sampling and the sampling rate, the Nyquist criterion, quantisation into levels, resolution and the number of bits, and quantisation error.
Sources & how we know this
- WJEC Eduqas GCE A-level Electronics specification — WJEC Eduqas (2017)