Computer Science · High School (9–10) · 12 courses, 120 worked problems, 120 practice questions
A computer does only what a program tells it, and this area is about writing those instructions well. An algorithm is a set of clear steps that solves a problem. You can write it as a flowchart or in pseudocode before you turn it into code. Algorithms and problem-solving cover searching, sorting, validation and trace tables. Programming covers variables, selection, iteration, arrays and subroutines. Boolean logic shows how gates such as AND, OR and NOT make decisions, and databases and SQL show how records are stored and found.
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?