The difference engine and a number of other pre-electronic mechanicmechanical calculators are probably the closest to what we consider nowadays digital. And they are, well, pre-electronic.
A mechanical calculator, or calculating machine, is a mechanical device used to perform the basic operations of arithmetic automatically, or (historically) a simulation such as an analog computer or a slide rule. Most mechanical calculators were comparable in size to small desktop computers and have been rendered obsolete by the advent of the electronic calculator and the digital computer.
The abacus is the oldest example that many will recognize, but Pascal's calculator is pretty similar in user experience to a modern day basic calculator, while being entirely mechanical, working by gears and springs.