Converting base b representation into decimal representation
Any integer b greater than 1 can serve as the base!
What number is (ak a k-1 ak-2 … a0)b ?
It is akbk + a k-1bk-1 + ak-2bk-2 + … + a0b0
E.g. (5032)10 = 5*103 + 0*102 + 3*101 + 2*100 =
= 5*1000 + 3*10 + 2 = 5032
(5032)8 = 5*83 + 0*82 + 3*81 + 2*80 =
1*24 + 0*23 + 1*22 + 1*21 + 0*20 =
= 16 + 0 + 4 + 2 + 0 = 22