Convert multiplication by 2**n to a shift