Base and Exponent Calculation.