Reversible computing with mechanical links and pivots