Computers use the binary number system as the digits can represent the two possible states of a digital circuit. Boolean operations can be performed on binary values using circuits called logic gates. Computers use circuits made up of multiple logic gates to perform arithmetic and logical operations such as addition.
Logic gates have been implemented in multiple ways over the decades, modern computers use transistors within integrated circuits. Some early computers used relays, which are electromechanical switches. The diagram shows how a simple relay works. When power is applied to the input pin, an electromagnet moves the switch to the upper output pin, allowing current to flow. If no power is applied to the input pin, the switch remains in contact with the bottom pin.
This activity involves the creation of a working model of a NOT gate, which inverts the input. If a 0 is inputted, a 1 is outputted. The circuits for relay based logic gates are very simple as no resistors are required.
This handout provides an overview of how to build the NOT gate, plus circuit diagrams for the AND and OR gates.
The same principle can be applied to more complex circuits that A-Level Computer Science students need to know about such as the Half and Full Adders. The image shows two Half Adders joined together to form a Full Adder with an additional Half Adder.