Fun computer science · Classes 8 to 10
Logic gates: how computers decide
Every decision a computer makes is built from tiny gates that take 0s and 1s and give back a 0 or a 1. Guess the output first, then test your guess.
1. Meet the gates
Pick a gate and set its two inputs. The lamp shows the output, and the truth table lights up the row you chose. Predict first.
2. A small circuit
Gates can be joined. Choose a circuit, set A, B and C, and see the value after each gate.
Remember in one minute
- AND: 1 only if both inputs are 1. OR: 1 if at least one input is 1. NOT: flips the input. XOR: 1 if the inputs are different.
- NAND is NOT AND and NOR is NOT OR. NAND and NOR are universal: any gate can be built from either alone.
- A truth table lists every input combination: n inputs give 2^n rows.
- To evaluate a circuit, work from the innermost brackets outwards.
Practice now: 3 levels, worked answers, progress tracker →
This is a practice aid made by BodhiScore, not a textbook or an official board resource. Your school’s textbook decides the exact syllabus and the way answers are written. Nothing on this page is saved or sent anywhere. This is a practice aid, not a substitute for your school textbook. These are standard computing facts; where a value depends on a convention (such as 1 KB = 1024 bytes) the question says which one is used.