The [difference engine][1] and a number of other pre-electronic [mechanic calculators][2] 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.


  [1]: https://en.wikipedia.org/wiki/Difference_engine
  [2]: https://en.wikipedia.org/wiki/Mechanical_calculator