value = 0;
for(i = 0; i < numberOfDigits; i++)
value += n^i + number[i];
So, if you have a base less than 1, you get smaller as you go to the left.
Also, if you have a negative base, you change from adding to subtracting every digit. In a sort of "That'll take 2 years, minus 4 months, plus 2 weeks, minus 3 days" sort of way.