That ispreciselythe meaning of "writing in basis x": you express numbers as a sum of powers of x multiplied by integers between 0 and x.

For example,

That is why, thus, in base 2 you have to sum up the powers of 2 corresponding to the 1's in the expression of the number in binary.

Tonio