Computer Science · High School (9–10) · 3 courses, 30 worked problems, 30 practice questions
Inside a computer, every decision comes down to true or false, written as 1 or 0. Boolean logic is the algebra of these two values, and logic gates carry it out in hardware. An AND gate gives 1 only when both inputs are 1. An OR gate gives 1 when at least one input is 1, and a NOT gate reverses its input. NAND, NOR and XOR are other common gates. A truth table lists the output for every set of inputs. A problem statement can be turned into a logic expression, drawn as a circuit and checked with a truth table.
Choose an answer, then check it. Each one shows a full explanation.
A logic gate gives an output of 1 only when both of its two inputs are 1. Which gate is it?
A rain sensor feeds a NOT gate. The sensor reads 0 because it is dry. What does the NOT gate give, and why?
In the syllabus symbols, which gate is drawn with a curved back and a pointed front, with no small circle at the output and no extra curved line behind it?
An OR gate is tested with the input pairs 0 0, 0 1, 1 0 and 1 1 in turn. Which list shows what it outputs?
Each one has a hint, the key idea and a full worked solution.
A circuit lights a warning sign. In it: A goes into a NOT gate; the output of the NOT gate and B go into an OR gate, whose output is X. Which pair of inputs is the only one that keeps the sign dark, with X = 0?
A bank vault opens only when three managers each turn their own key at once. The circuit is built from two-input AND gates. Of all the possible on and off settings of the three keys, how many keep the vault shut?
A garden light L comes on when it is dark (D = 1) and movement is detected (M = 1). Which logic expression describes the light?
A circuit is X = (A OR B) AND (NOT C). Which set of inputs makes X equal to 1?
A student must draw a circuit for X = A AND B AND C. The student draws one AND gate with three inputs. What should the circuit be?
Which expression gives the same output as NOT (A AND B) in every row of the truth table?