Digital Mechanics