Modular Arithmetic With Exponents