StudyVault
Home Unit Overview Exam Technique Revision Techniques ← Previous Lesson Next Lesson →

← Back to Dashboard

Overlay:
0:00 / 0:00 Narration generated using AI text-to-speech.

Logic Gates, Truth Tables and Boolean Algebra

Two-State Logic: The Language of Digital Electronics

Every digital circuit, from a simple alarm to a microprocessor, is built from components that work with just two voltage levels. Logic 1 (HIGH) represents a voltage near the supply rail; Logic 0 (LOW) represents a voltage near 0 V. This two-state system is called binary logic. Because there are only two states, every circuit decision can be described mathematically using Boolean algebra — a branch of mathematics developed by George Boole that uses only 0s and 1s.

A logic gate is a small integrated circuit with one or two inputs and a single output. The output depends entirely on the combination of inputs at that moment. The relationship between inputs and output is described in a truth table and captured in a Boolean expression. You need to know five gates for your exam: NOT, AND, OR, NAND and NOR.

The NOT Gate

The NOT gate (or inverter) has one input and one output. It simply inverts the input: a Logic 1 input produces a Logic 0 output, and vice versa. The Boolean expression uses a bar (overline) to denote inversion: if the input is A, the output is \(\overline{A}\).

NOT gate truth table
A (input)Q (output)
01
10

The AND Gate

The AND gate has two (or more) inputs. The output is Logic 1 only when all inputs are Logic 1. If any input is 0, the output is 0. The Boolean expression uses a dot (or no symbol) to represent AND: \(Q = A \cdot B\) or simply \(Q = AB\).

AND gate truth table
ABQ = A · B
000
010
100
111

The OR Gate

The OR gate output is Logic 1 when at least one input is Logic 1. Only when all inputs are 0 is the output 0. The Boolean expression uses a plus sign: \(Q = A + B\).

OR gate truth table
ABQ = A + B
000
011
101
111

The NAND Gate

The NAND gate is an AND gate followed by a NOT. Its output is Logic 0 only when all inputs are Logic 1 — it is 1 in every other case. The Boolean expression is \(Q = \overline{A \cdot B}\).

NAND gate truth table
ABQ
001
011
101
110
Key Fact

The NAND gate is the exact inverse of AND. It is the most important gate in electronics because any logic function can be built from NAND gates alone — making it a universal gate.

The NOR Gate

The NOR gate is an OR gate followed by a NOT. Its output is Logic 1 only when all inputs are Logic 0. The Boolean expression is \(Q = \overline{A + B}\).

NOR gate truth table
ABQ
001
010
100
110

A NAND gate can act as a NOT gate if both inputs are connected together or if one input is tied permanently to Logic 1. When both inputs equal A, the truth table becomes: if A=0, output=1; if A=1, output=0 — identical to a NOT gate.

This is a frequently-examined configuration. If you see a NAND gate symbol where the two inputs share the same signal, or where one input is connected to the supply rail (Logic 1), treat it as a NOT gate. Writing its output as \(\overline{A \cdot A} = \overline{A}\) confirms the equivalence.

A common exam error: treating a NAND gate with one input at Logic 1 as if it were still a two-input NAND. When input B is permanently 1, the gate simplifies to \(Q = \overline{A \cdot 1} = \overline{A}\). The second input drops out of the expression entirely.

Writing Boolean Expressions

A Boolean expression describes the output of a logic circuit in terms of its inputs. For a circuit with three inputs A, B and C passing through an AND gate and an OR gate, the expression might be \(Q = A \cdot B + C\). Boolean algebra follows operator precedence: NOT is evaluated first, then AND (multiplication), then OR (addition). Brackets override this order just as in ordinary algebra.

For this course, expressions are kept to a maximum of three inputs. A typical sum-of-products expression for three inputs might look like \(Q = A \cdot B \cdot C + A \cdot \overline{B} \cdot C\). You also need to use Boolean identities and NAND gate redundancy to simplify logic circuits.

Key Fact

Boolean notation: NOT uses a bar over the variable (\(\overline{A}\)); AND uses a dot or no symbol (\(A \cdot B\) or \(AB\)); OR uses a plus sign (\(A + B\)). Operator precedence: NOT first, then AND, then OR.

A three-input truth table has \(2^3 = 8\) rows (one for every combination of 0s and 1s). Always list them in binary counting order: 000, 001, 010, 011, 100, 101, 110, 111. This guarantees you do not miss any combination.

To fill in the output column, evaluate the Boolean expression for each row by substituting the values of A, B and C. For \(Q = A \cdot B + C\): when A=1, B=0, C=1, \(Q = 1 \cdot 0 + 1 = 0 + 1 = 1\). Work methodically one row at a time; rushing is where most errors creep in.

Practice Questions

Test yourself on this lesson. Pick a question, write your answer, then get it marked.

AI feedback
AI feedback is guidance, not a final exam mark. If you disagree, your teacher's view is always the tie-breaker.
← Back to unit
Video

© 2026 StudyVault · About · FAQ · Copyright & IP · Privacy · Disclaimers

StudyVault Education Ltd · registered in England and Wales, company no. 17490559 · 71–75 Shelton Street, London WC2H 9JQ