Convert bitmath into regular math?

Bitshift left and right are multiplication and division by powers of 2.