Calculation with most significant digit first