General plan of all gearing, composite diagram from De Solla Price, Transactions of the American Philosophical
Society Vol 64 No 7 (1974).
This is a link to an article written for the American Mathematical Society's website back in April 2000 on the function of the Antikythera Mechanism (the world's oldest example of a mechanism with gears dating from 87 B.C.). The discovery of the mechanism surprised scholars because it was not believed that ancient Greeks possessed such technology. The article goes into a lot of detail and has working Java applets!-from Boing Boing
From the article..
The Antikythera Mechanism is the name given to an astronomical calculating device, measuring about 32 by 16 by 10 cm, which was discovered in 1900 in a sunken ship just off the coast of Antikythera, an island between Crete and the Greek mainland. Several kinds of evidence point incontrovertibly to around 80 B.C. for the date of the shipwreck. The device, made of bronze gears fitted in a wooden case, was crushed in the wreck, and parts of the faces were lost, "the rest then being coated with a hard calcareous deposit at the same time as the metal corroded away to a thin core coated with hard metallic salts preserving much of the former shape of the bronze" during the almost 2000 years it lay submerged. The quotation is from Derek de Solla Price's monograph Gears from the Greeks ... in the 1974 Transactions of the American Philosophical Society (Volume 64, part 7).
It is hard to exaggerate the singularity of this device, or its importance in forcing a complete re-evaluation of what had been believed about technology in the ancient world. For this box contained some 32 gears, assembled into a mechanism that accurately reproduced the motion of the sun and the moon against the background of fixed stars, with a differential giving their relative position and hence the phases of the moon. It is enough to know that there is no trace of anything like it until around 1000 A.D., and that when it was first published there were serious suggestions that it had been dropped into the wreck at a much later date or even that it was the work of alien astronauts.
Complete Article: antikythera1-1
Java based visualization: antikythera-animation