Zotoaster is right imho. Pneumatic is the way to go. I built a some AND, OR, NAND, & XOR etc.. gates with Lego technic pneumatic cylinders, compressor, actuators; to make a simple calculator. Gears and micro motors from the Technic line are also awesome components to have. If you want to go truly mechanical old school look up some ideas behind turing machines, turing computers...
Charles Babbage is a good resource,, especially "
Difference Engine". As well as
Alan Turing!
Lego Technic Pneumatic Adding Machine (I built mine off of this design)
Difference Engine
Lego Difference Engine
Turing Machine
Lego Technic Turing Machine/Computer
Elctro-mechanical Turing-Welchman Bombe
~ZENassem