Logic elements
Every logical operation of a computer is carried out by logic elements, which are simple electronic circuits. The signals at the inputs are the arguments and the output signal is their function; a signal present means 1 and absent means 0. In an AND element the output is 1 only when all inputs are 1 – like two switches connected in series: the bulb lights only when both are closed. An OR element is like a parallel connection: the bulb lights if either switch is closed. A NOT element has one input and its output is the opposite. In a larger circuit the output of one element goes to the input of the next, so we calculate the circuit step by step from left to right. Modern processors contain billions of such elements built from transistors. Do experiments only with a small battery and bulb, with an adult present, and never with mains electricity.
F = NOT A → 0
The A and B buttons flip an input between 0 and 1
A school cupboard has two locks and opens only with both keys. A classroom door opens with either of two keys. A child understood the difference between the two cases by seeing them at the door.
Electronics engineers design logic circuits, and people who build security systems use locks with two conditions.
On paper, write the opening rule for a chest with two locks as a table: for each lock the key is present or absent.
“Human circuit”: three pupils act as AND, OR and NOT. When the input pupils raise (1) or lower (0) their hands, the element pupils raise or lower their own hand according to the rule.