Kramizo
Log inSign up free
Home › CIE IGCSE Computer Science › Boolean Logic
CIE · IGCSE · Computer Science · Revision Notes

Boolean Logic

1,771 words · Last updated October 2026

⚡
Ready to practise? Test yourself on Boolean Logic with instantly-marked questions.
Practice now →

What you'll learn

Boolean logic is the mathematics of true and false that underpins every decision a computer makes. This overview covers the Boolean logic unit of CIE IGCSE Computer Science (0478): the six logic gates — NOT, AND, OR, NAND, NOR and XOR — their symbols and functions, completing truth tables, drawing logic circuits from Boolean expressions and from problem statements, writing logic expressions from circuits and truth tables, and working with circuits of up to three inputs. The sub-topic guides on logic gates and on Boolean algebra go further, including simplification.

Paper 1 regularly includes a question where you draw a circuit from a description, complete an eight-row truth table or write an expression from a circuit. These are methodical tasks: a systematic approach earns full marks.

Key terms and definitions

Boolean value — A value that is either TRUE (1) or FALSE (0).

Logic gate — An electronic component that takes one or more inputs and produces one output based on a logical rule.

Truth table — A table showing the output for every possible combination of inputs.

Logic circuit — Several logic gates connected together.

Logic expression — A statement using inputs and the operators AND, OR, NOT, NAND, NOR and XOR, such as X = (A AND B) OR C.

NAND — NOT AND: output is 0 only when all inputs are 1.

NOR — NOT OR: output is 1 only when all inputs are 0.

XOR — Exclusive OR: output is 1 when the inputs are different.

Core concepts

The six gates

NOT — one input; the output is the opposite of the input.

A X
0 1
1 0

AND — output is 1 only if both inputs are 1.

OR — output is 1 if at least one input is 1.

NAND — the opposite of AND: output is 0 only if both inputs are 1.

NOR — the opposite of OR: output is 1 only if both inputs are 0.

XOR — output is 1 if the inputs are different.

A B AND OR NAND NOR XOR
0 0 0 0 1 1 0
0 1 0 1 1 0 1
1 0 0 1 1 0 1
1 1 1 1 0 0 0

Learn this table thoroughly — almost every logic question depends on it.

Gate symbols

In circuit diagrams:

  • AND — a D shape with a flat back.
  • OR — a curved shield shape with a pointed front.
  • NOT — a triangle with a small circle at its output.
  • NAND — the AND shape with a small circle at the output.
  • NOR — the OR shape with a small circle at the output.
  • XOR — the OR shape with an extra curved line behind the input side.

The small circle always means "NOT" — the output is inverted.

Truth tables with three inputs

With three inputs there are 2³ = 8 combinations. List them by counting in binary from 000 to 111:

A B C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

Add a working column for each gate before the final output column.

From expression to circuit

For X = (A AND B) OR (NOT C):

  1. Draw A and B going into an AND gate.
  2. Draw C going into a NOT gate.
  3. Feed both outputs into an OR gate, whose output is X.

Work from the innermost brackets outwards.

From problem statement to expression

Read the statement carefully and identify the conditions. For example:

"An alarm (X) sounds if the door is open (A = 1) and the system is armed (B = 1), or if the panic button is pressed (C = 1)."

X = (A AND B) OR C

Phrases such as "either … but not both" indicate XOR; "not both" indicates NAND; "neither … nor" indicates NOR.

From circuit to expression

Work from the inputs towards the output, writing the expression for each gate's output and combining them. Use brackets to show which gates are evaluated first.

From truth table to expression

For each row where the output is 1, write an AND term describing that row's inputs (using NOT for inputs that are 0), then OR the terms together. For example, if X = 1 only when A = 1, B = 0 and C = 1, then X = A AND (NOT B) AND C. This method always produces a correct expression, although it may not be the simplest.

Phrases that signal each gate

Wording in the question Gate
"both A and B" AND
"A or B, or both" OR
"either A or B but not both" / "exactly one" XOR
"not both A and B" NAND
"neither A nor B" NOR
"A is not on" / "A is off" NOT A

When conditions are stated as values, translate carefully: "the temperature is not above 30 (T = 0)" means you should use NOT T in the expression.

Logic in real systems

Logic circuits control many everyday devices. A car's interior light might come on if a door is open OR the light switch is on: L = D OR S. A safety guillotine might only operate if both hands are on separate buttons AND the guard is down: X = (H1 AND H2) AND G. A greenhouse sprinkler might run if the soil is dry AND it is NOT raining: X = D AND NOT R. Being able to turn a description like these into an expression, a circuit and a truth table is the core skill of this unit.

Checking a circuit

After drawing a circuit, test it with one or two rows from your truth table. Write the input values on the diagram, work out the output of each gate in turn, and confirm the final output matches the table. This catches errors such as a missing NOT gate or inputs connected to the wrong gate. Count the gates too: if the expression contains three operators, the circuit should normally contain three gates.

Why NAND and NOR matter

NAND and NOR gates are called universal gates, because any other gate — and therefore any logic circuit — can be built using only NAND gates or only NOR gates. Manufacturers often build circuits from them because it simplifies production. At IGCSE you need to know their truth tables and symbols rather than how to build other gates from them, but knowing why they matter helps you remember them.

Worked examples

Example 1: Three-input truth table

Complete the truth table for X = (A OR B) AND NOT C.

A B C A OR B NOT C X
0 0 0 0 1 0
0 0 1 0 0 0
0 1 0 1 1 1
0 1 1 1 0 0
1 0 0 1 1 1
1 0 1 1 0 0
1 1 0 1 1 1
1 1 1 1 0 0

Example 2: XOR in a scenario

A light (X) is controlled by two switches, A and B. The light is on if exactly one switch is on. Write the expression.

Answer: X = A XOR B.

Example 3: Problem statement with three conditions

A machine (X) runs if the guard is closed (G = 1) and either the start button is pressed (S = 1) or the timer has triggered (T = 1). Write the expression.

Answer: X = G AND (S OR T).

Example 4: NAND and NOR

Evaluate A NAND B and A NOR B when A = 1 and B = 0.

A AND B = 0, so A NAND B = 1. A OR B = 1, so A NOR B = 0.

Example 5: Expression from a truth table

X = 1 only for the rows A=0, B=1 and A=1, B=0. Write an expression.

Answer: X = (NOT A AND B) OR (A AND NOT B), which is the same as A XOR B.

Common mistakes and how to avoid them

  • Mixing up NAND and NOR. NAND is 0 only when all inputs are 1; NOR is 1 only when all inputs are 0.
  • Treating XOR like OR. XOR is 0 when both inputs are 1.
  • Missing rows in three-input tables — there must be eight.
  • Forgetting brackets in expressions, which changes their meaning.
  • Drawing NOT gates with two inputs.
  • Missing the small circle on NAND and NOR symbols.

Exam technique for "Boolean Logic"

  • Draw gate symbols neatly and label every input and output.
  • Use working columns in truth tables; they reduce mistakes and can earn credit.
  • When converting a statement, underline AND, OR, NOT and phrases that signal XOR, NAND or NOR.
  • Check your circuit against the expression by tracing one row of inputs through it.

Quick revision summary

  • Six gates: NOT, AND, OR, NAND, NOR, XOR.
  • AND = both; OR = at least one; NAND = not both; NOR = neither; XOR = exactly one; NOT = inverse.
  • A small circle on a symbol means the output is inverted.
  • Three inputs give eight rows; list them in binary order.
  • Build circuits from the innermost brackets outwards; write expressions from inputs to output.
  • From a truth table: AND together the inputs for each row with output 1, then OR the terms.

Test yourself on Boolean Logic

5 quick questions · instantly marked

Loading questions…

Boolean Logic: common questions

What are the most common mistakes in Boolean Logic?

Mixing up NAND and NOR: NAND is 0 only when all inputs are 1; NOR is 1 only when all inputs are 0. Treating XOR like OR: XOR is 0 when both inputs are 1. Missing rows: in three-input tables — there must be eight.

Where can I practise Boolean Logic questions for free?

Kramizo has free CIE IGCSE Computer Science practice questions on Boolean Logic, each marked instantly with a full explanation. No card is required.

Free for IGCSE students

Lock in Boolean Logic with real exam questions.

Free instantly-marked CIE IGCSE Computer Science practice — 45 questions a day, no card required.

Try a question →See practice bank