C# Difference Engine

The Difference Engine was a tabulating mechanism designed and partially built by Charles Babbage in 1823. It was built to automatically tabulate and print polynomials of varying degree and accuracy, depending on the number of gear columns and gears per column in the implementation. It also operated in parallel. It is widely considered today to be the first mechanical implementation of a mathematical principle and is considered, along with the related Analytical Engine, to be the theoretical precursor to modern computers.

This program is a direct simulation of the Difference Engine's mechanisms. Like the Difference Engine, it implements the Method of Differences to tabulate the polynomials digit-by-digit. Also like the Difference Engine, it operates in parallel and must be provided proper initial values. The included README provides detailed instructions on how to operate the program. While the physically realized DE2 has 7 columns and 31 digits, this smaller program has 5 columns and 8 digits, but could be easily extended ad infinitum.

This was developed in a single night during a bout of obsession with the Engine. The beauty of Babbage's Engine - and the ideas behind it - is immense, and its mechanical genius holds a special place in my heart. For those interested in Babbage and his work, this is the best book I have read so far on the subject.