Any medium that can effectively represent a continuous data state can serve as the basis for an analog computer. The earliest examples of analog computers were mechanical computers, which use moving parts and gears. Hydraulic computers and electrical computers were developed later. In recent years, analog computing principles have been modeled using optical computers and have formed the basis for some emerging implementations of quantum computing.
An analog computer uses some medium to represent the states of discrete variables. Unlike digital computers, which convert variables to a series of numbers, analog computers work with variables directly. They transform and conduct operations on variables using mechanical, electrical, or other processes to directly alter the state of the media representing the variable.
Mechanical analog computers have an ancient history. The Antikythera mechanism, a product of Ptolemaic Egypt, modeled the movements of objects visible in the sky, using a complicated series of gears. Orreries served a similar function in the early modern period. Much more advanced mechanical analog computers were used during the First and Second World Wars to encode and decode data as well as to assist in aiming large artillery pieces.
Hydraulic computers model data using the flow of liquid rather than the movement of mechanical parts. Perhaps the earliest examples are the water clocks used during the Middle Ages. These used the steady flow and pressure of water to accurately measure the passage of time. More modern hydraulic analog computers use the flow of various liquids through closed systems to model data.
Electrical analog computers use one of several properties of electricity to represent and manipulate data. The most common varieties have historically used voltage for this purpose. This sort of analog computer is quite powerful and could outperform early digital computers when performing certain functions but was less versatile, as each new program typically required the physical modification of wiring and circuitry.
Analog computing can also be carried out by optical computers. These computers encode information in the various properties of light and process data by acting directly on that information. This type of computing can perform certain tasks, most notably image analysis, with great efficiency.
The multi-state nature of analog computing is also being employed in the development of the first generation of quantum computers. Quantum computers can be structured to take advantage of the natural similarity between certain types of physical structures and the underlying mathematical structure of some problems addressed by quantum mechanics. As quantum computing emerges from its infancy, this type of computer is apt to become more common and important.