Electronic switch
An electronic switch is a device that can stop or start an electric current. Their invention was important in the history of computing for their use in the earliest electronic computers. Three generations of electronic switches have been used in the digital computer industry.
Electromechanical relays
The earliest digital switch was the electromechanical relay, consisting of a solenoid with mechanical contact points. Relays provide a physical switch that closes when electricity animates a magnet. Early relays were slow and prone to failure due to dust in the contacts or bending of moving metal parts. Modern relays are more resilient because they are encased in housings that prevent dirt or dust from clogging relays. However, they are still prone to failure over time due to mechanical stress.
Vacuum tubes
Vacuum tubes, initially used as analog amplifiers, came to be used as electronic "on/off" switches. The became available in the early 1900's and use no physical contacts to break or get dirty. They can work faster than electromechanical relays.
Transistors
From the 1950's to the present, the prevalent electronic switch has been the transistor, invented at AT&T Bell Laboratories in 1948 by John Bardeen, Walter Brattain, and William Shockley (who won the Nobel prize in 1956 for its invention). Transistors are equivalent in operation to vacuum tubes, but are much smaller, require less power, and obtain faster switching times. The first transistor was made from materials that included a paper clip and a razor blade.