The basic building blocks of a computer system are AND, OR and NOT gates.
The purpose of these and other gates are to control the flow of electricity. The AND gate and OR gates in their most basic form has two input wires and one output wire. Voltages on the wires represent either the base 2 number 0 or 1.
The AND gate.
The output for the AND gate is 1 if and only if both input wires are 1.
The OR gate.
The output for the OR gate is 1 if either input wire is 1.
The NOT gate.
The NOT gate has 1 input wire and one output wire that are always opposite in value. I.e., when the input wire is 1 the output wire is 0 and vice versa.