Skip to main content
WalesElectronicsSyllabus dot point

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.

Generated by Claude Opus 4.812 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 dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

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 Q=KPQ = K \cdot P 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 A+B+C\overline{A + B + C} without the long bar. [2 marks]

  • Cue. A+B+C=ABC\overline{A + B + C} = \overline{A} \cdot \overline{B} \cdot \overline{C}: 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: Q=ABQ = \overline{A \cdot B}.

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 AB=A+B\overline{A \cdot B} = \overline{A} + \overline{B}. 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: Q=AB=AB+ABQ = A \oplus B = \overline{A} \cdot B + A \cdot \overline{B}.

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

Sources & how we know this