What do the NAND and NOR gates do, and why is the NAND gate called a universal gate?
State the function, truth table and Boolean expression of the NAND and NOR gates and explain why NAND is universal
A focused answer to the O-Level Electronics outcome on NAND and NOR gates. Their truth tables and Boolean expressions as inverted AND and OR, and why NAND is a universal gate.
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
SEAB wants you to state the function, truth table and Boolean expression of the NAND and NOR gates, and to explain why the NAND gate is called universal. The central insight is that NAND and NOR are simply AND and OR followed by a NOT, so their outputs are the inverses of the AND and OR outputs, and that NAND is special because every other gate can be built from NAND gates alone.
The answer
The NAND gate
NAND stands for NOT-AND: it is an AND gate followed by a NOT gate. Its output is the inverse of the AND output, so it is logic 0 only when all inputs are 1, and logic 1 in every other case. The Boolean expression is:
Truth table: , , , . The symbol is the AND shape with a small circle (bubble) on its output to show the inversion.
The NOR gate
NOR stands for NOT-OR: it is an OR gate followed by a NOT gate. Its output is the inverse of the OR output, so it is logic 1 only when all inputs are 0, and logic 0 in every other case. The Boolean expression is:
Truth table: , , , . The symbol is the OR shape with a bubble on its output.
Why NAND is universal
A gate is universal if every other logic function can be built from copies of it alone. The NAND gate is universal: NOT, AND, OR and NOR can all be made using only NAND gates. For example:
- A NOT gate is made by joining both inputs of a NAND together, so it computes the inverse of a single input.
- An AND gate is a NAND followed by a NAND-as-inverter, which cancels the inversion.
Because a manufacturer can build an entire logic system from one type of gate, NAND (and equally NOR) gates simplify design and production. This universality is a key idea of digital electronics.
Making a NOT from a NAND
The most useful trick is turning a NAND into an inverter: tie both inputs together (or hold one input at logic 1). Then the output is the inverse of the common input, exactly the NOT function. This is the building block that lets NAND gates make every other gate.
Examples in context
Example 1. A single-chip logic design. A designer who needs a mix of AND, OR and NOT functions can build the whole circuit from one type of integrated circuit packed with NAND gates. Because NAND is universal, only one part number is stocked, which cuts cost and simplifies the layout. This is universality put to practical use.
Example 2. A NOR-based alarm reset. A NOR gate outputs 1 only when both inputs are 0, which makes it natural for "all clear" logic: the output goes high only when every sensor reads 0. The same gate, used the other way, is a building block for memory latches, showing how the inverted gates earn their keep.
Try this
Cue. State the only input combination for which a two-input NAND gate outputs 0. When both inputs are 1; for every other combination the NAND output is 1.
Cue. Write the Boolean expression for a NOR gate with inputs and . , the inverse of the OR output.
Cue. Explain how to make a NOT gate from a single NAND gate. Connect both NAND inputs to the same signal; the output is then the inverse of that input, which is the NOT function.
Exam-style practice questions
Practice questions written in the style of SEAB exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
Original4 marksDraw the truth tables for a two-input NAND gate and a two-input NOR gate, using inputs A and B.Show worked answer →
NAND is AND followed by NOT, so its output is the opposite of the AND output:
A=0 B=0 gives 1; A=0 B=1 gives 1; A=1 B=0 gives 1; A=1 B=1 gives 0.
NOR is OR followed by NOT, so its output is the opposite of the OR output:
A=0 B=0 gives 1; A=0 B=1 gives 0; A=1 B=0 gives 0; A=1 B=1 gives 0.
What markers reward: NAND giving 0 only for (all others 1), and NOR giving 1 only for (all others 0). These are the inverses of the AND and OR tables.
Original4 marksExplain why a NAND gate is described as a universal gate, and state how a NAND gate can be made to act as a NOT gate.Show worked answer →
A NAND gate is universal because any other logic gate (NOT, AND, OR, NOR) can be built using only NAND gates. This means a whole logic system can be made from a single type of gate.
To make a NOT gate from a NAND gate, connect both inputs together (or tie one input to logic 1). Then the NAND of an input with itself gives the inverse of that input, which is exactly the NOT function.
What markers reward: universal meaning any gate can be built from NAND alone, and tying the NAND inputs together to make an inverter. Mentioning the manufacturing advantage of one gate type earns credit.
Related dot points
- State the function, symbol, truth table and Boolean expression of the AND, OR and NOT logic gates
A focused answer to the O-Level Electronics outcome on the basic logic gates. The AND, OR and NOT gates with their symbols, truth tables and Boolean expressions.
- Describe digital logic levels, explain binary representation, and convert between small binary and denary numbers
A focused answer to the O-Level Electronics outcome on digital signals. Logic 0 and 1, why two levels are robust, binary place values, and converting between binary and denary numbers.
- Derive the truth table of a combinational logic circuit built from two or more gates and write its Boolean expression
A focused answer to the O-Level Electronics outcome on combinational logic. Building the truth table of a multi-gate circuit step by step and writing its Boolean expression.
- Design a simple logic system from a written specification by building its truth table and selecting the gates needed
A focused answer to the O-Level Electronics outcome on designing logic systems. Turning a written specification into a truth table, a Boolean expression and a gate circuit.