Mechanical computer

The mechanical computer is a device invented 480 million Earth-years ago that is capable of performing calculations programmed by the user.

Data Storage
Mechanical computers use the positions of wheels, levers, or switches to store data. Numerical data is usually stored in analog form using the rotational angle of a wheel. In situations where the stored number is expected to fall within a small range, the number represented is proportional to the angle of the wheel. For numbers where a minimum level of precision is required but the range is unknown, a wheel with a logarithmic scale is often used. Numbers may also be stored by two wheels, with one representing a mantissa and the second representing an exponent, with either linear or logarithmic scale. Binary and trinary data (representing a flag variable) is represented by dipole and tripole switches, respectively. A series of tripole switches can be used to store integer data.

Computation
Most computers include two arithmetic logic units (ALUs): one analog and one digital. The analog ALU is responsible for addition, subtraction, multiplication, and division of real numbers. Integer arithmetic and boolean logic are handled by the digital ALU.

Input
The most common form of input is a momentary switch that triggers the storage of a unique value into a region of memory known as the input buffer. An input panel may contain hundreds of triangular switches, usually arranged into a tesselated grid. The switch's position along each of the three axes (horizontal row, left diagonal column, and right diagonal column) is contained in the stored value sent to the input buffer. Rotary dials may also be used for the input of real numbers, although precision is limited by the user's ability to position the dial accurately.

Output
A simple mechanical computer may use wheels to display data. Some wheels are labeled with the complete series of one or two digit numbers, while others show symbols or text that provides a context for the numbers displayed. More sophisticated computers may have a display