IGCSE Computer Science

IGCSE Computer Science logic gates and truth tables

Six gates, circuits with up to three inputs, and three ways to describe the same logic: a circuit, a truth table and an expression. Questions ask you to move between them.

GatesNOT, AND, OR, NAND, NOR, XOR
InputsUp to three, so up to 8 rows in a truth table
PaperPaper 2, topic 10

Check your working: Truth table generator

Completing a truth table

  • List the input rows in binary order: 000, 001, 010 and so on up to 111.
  • Add a working column for each gate's output, then use those columns as inputs to the next gate.
  • Check one row by hand at the end, following the circuit from the inputs to the output.

From a problem to an expression

Pick out each condition in the statement, decide whether conditions must all be true (AND), any may be true (OR), or one must not be true (NOT), and bracket the parts so the order is clear.

Try 2 questions

Question 1
How many inputs does a NOT gate have?
Question 2
A fan F switches on when the room is hot (T = 1) and the room is occupied (O = 1), or when the manual switch M is on (M = 1). Which expression describes F?

Next step

Questions people ask

Do I need to simplify logic expressions?

No. Circuits and expressions are written for the statement as given, without simplifying.

Can a gate have more than two inputs?

No. NOT has one input and every other gate has two; a whole circuit has at most three inputs and one output.