Logic gates
A logic gate works on binary signals: each input and the output is either 1 (true/on) or 0 (false/off). IGCSE uses six gates: NOT, AND, OR, NAND, NOR and XOR.
How each gate behaves
- NOT has one input and inverts it (0 becomes 1, 1 becomes 0).
- AND outputs 1 only when both inputs are 1.
- OR outputs 1 when at least one input is 1.
- NAND is the opposite of AND (output 0 only when both inputs are 1).
- NOR is the opposite of OR (output 1 only when both inputs are 0).
- XOR outputs 1 when the inputs are different.
Key idea
AND = "both", OR = "at least one", NOT = "invert", XOR = "different". NAND and NOR are AND and OR with the output flipped.
Logic circuits
A logic circuit joins several gates so the output of one becomes an input of the next. To find the final output, work through the circuit gate by gate for each set of inputs. A Boolean expression describes a circuit, for example P = (A AND B) OR (NOT C).
Example
If A = 1 and B = 0, then A AND B = 0, while A OR B = 1 and NOT B = 1.