Writing numbers in base 10 means to write them as a combination of powers of 10, for example
So, writing numbers in any base means to do the same thing: for example, in base 3, we have
So, in order to write 80 in base 3, we have to find out the largest power of 3 that fits: we have
So, since is too much, our number will have 4 digits:
In order to find the digits, again we see "how much it fits": we have
So, we choose . The remainder is
Now we need to fix the coefficient for : we have
Again we choose
Keep going like this and you'll find out that
This was actually a special case, because our number is exactly one less than a power of 3: we have
and just like in base 10, when we subtract 1 from a power of 10 we get a number composed by 9 only:
In every base, when we subtract 1 from a power of the base we get a number composed by (base-1) only: