Base two numbers are very useful in computers and other appliances with circuitry, because electricity uses a two-value system. An electric current is either on (1) or off (0). Thus, all commands to a computer are relayed via circuits that either conduct (1) or do not conduct (0) an electric current. These two states of electric current correspond to two digits in the base two system, 0 and 1. In order to carry out complicated instructions, the circuits must obey the laws of logic.
There are two basic circuits, an "and-circuit" and an "or-circuit." In the "and-circuit," both p and q switches must be on to light the bulb. Electricity will flow only if both p and q are closed:
Circuit for p and q (series circuit)
In the "or-circuit," either p or q must be on to light the bulb. Electricity will flow if either p or q are closed:
Circuit for p or q (parallel circuit)
A branch of mathematics called Boolean algebra deals with the logic that must be applied to create complicated circuits. Calculators and computers use microchips that are made with specific circuits that mimic the rules of Boolean algebra.