Fundamentals of mechanical computers design