# Why does base $b$ have digits from $0$ to $b-1$?

Base system with $b \in \mathbb N$ consists of $b$ digits $d_0,d_1,d_2\dots d_{b-1}$. A number $a$ is expressed by some weighted sum of (integer) powers of $b$, where the digits $d_0,d_1,d_2\dots d_{b-1}$ are the weights.

My question is, why do we, if $b$ is a natural number greater than $1$, select the weights or the digits to be whole numbers and why do we need $b$ of them?

In the usual base $2$ system, with weights $0$ and $1$, number $15$ in base $10$, for example, would be expressed as $1111$.

However, if we say that the base two system has weights $0$ and $\frac{1}{3}$, which we name $a$, $15_{10}$ would be $a0aa0a$, ie. $\frac{1}{3} 2^5+\frac{1}{3} 2^3+\frac{1}{3} 2^2+\frac{1}{3} 2^0$.

It is a tad longer than with the usual weights. Is that the only reason to use $0$ and $1$, instead of $0$ and $1/3$?

How about base $3$ with weights $0$ and $\frac{2}{5}$, denoted by $b$? For example $15_{10}$ would be $bb0b.\overline {bbb}$ or $\frac{2}{5}3^3 + \frac{2}{5}3^2 + \sum_{n=0}^{\infty} \frac{2}{5}3^{-n}$.

Can I choose the weights or base digits in any way I want and there would always be a way to write any number in any base using them? Or do some other complications arise?

-
Cause number with base $b$ has $b$ units in them and one of them being $0$. – Inceptio Mar 26 '13 at 18:43
What is your goal? – Berci Mar 26 '13 at 18:45
@Berci Do I need a goal? – Valtteri Mar 26 '13 at 18:47
Using weights $0$ and $1$ in base $3$, one only gets a Cantor set of possible values, so it is impossible to represent $2$ or $5$. Likewise in your example with weights $0$ and $\tfrac25$, try to represent $2$. – Erick Wong Mar 26 '13 at 18:48
@Inceptio Yes, I get that now. How about the choice of those $b$ units? Or what if we use something like base $\pi$ or $3/5$? How do you select the number of units? – Valtteri Mar 26 '13 at 19:03

It would seem the first requirement would be to represent all naturals with just numbers in front of the fraction point. If your smallest unit is greater than $1$, this will fail with $1$. For $b=2$, as long as the weight is $\frac 1n$, you can represent all the naturals in base $b$-it is just representing $n$ times the natural you want in regular base $2$. Perhaps a bit of trouble, but it can be done. If you choose $w=\frac 23$ you can't represent any odd numbers-that is terrible.

The reason we have $b$ units in base $b$ is because that is how many it takes. Below $b^n$ you only have $n$ digits, so if you have fewer than $b$ weights you will miss some. This will apply even for units smaller than $1$ if you make $n$ large enough.

-

Base of a number is the number of units. If you represent $a_1a_2\dots a_n$ in base $b$, number of possible values have to be $0 \le a_i<b$. Which means the base is upto $b-1$.

What happens if you let bases to be in fractions?

If $\dfrac{p}{q} <1$, representing $n$ is done by using digits larger than $\dfrac{p}{q}$ which is not allowed.

When $\dfrac{p}{q} >1$, representing $n$ is done by using natural numbers less than $\dfrac{p}{q}$, IF your able to represent $n$ using digits less than $\dfrac{p}{q}$, you will oserve that you won't be able to do it for $n+1$, which contradicts the definition of base.

What happens in irrational numbers?

Take an example of $\pi$, you will note that number digits that can be used are $\{0,1,2\}$. Every combination of the numbers with base $\pi$ will give an irrational except for $(1)_{\pi},(2)_{\pi}$ and $(0)_{\pi}$.

If you let rational numbers used in representation of a number $n$ in base $b$

Such that :$0 \le a_i<b$ and $a_i$ $\epsilon$ $R$, there are infinite of the rational numbers between any rational numbers. So that's not valid.

Therefore, definition of Radix(Base) is just valid to natural numbers of base $10$.

-

All that is needed is that there a digit equal to each number 0 to b-1, modulo b. That is, you can add or subtract b from various d where d is in 0 to b-1.

Base 3 works with digits $0,1,2$ or $0,1,-1$ or $3,1,-1$ or $3,1,2$. Except for 3,1,-1, the bases are correctly spelt: ie sorted spelling is sorted size.

On the other hand, one can quite easily have negative bases, like $-3$, and even complex bases like $\sqrt{-3}$. Both of these rely on the digits $-1, 0, 1$ in their usual form, the latter is implemented by carrying and borrowing over two columns.

The following is a multiplication of $7+4\sqrt{3}$ by $7-4\sqrt{3}$, in base $\sqrt{3}$, which is ordinary base 3, with carry and borrow over two columns (ie 3 = 1 0 0).

     7+4 sqrt(3)     1  1  m  1  1   = 1 0 m 0 1 + 1 0 1
7-4 sqrt(3)     1  m  m  m  1   = 1 0 m 0 1 - 1 0 1
-------------
1  1  m  1  1
m  m  1  m  m
m   m  1  m  m
m  m   1  m  m
1  1  m   1  1
---------------------------
1  0 -3   0  1  0 -3  0  1    carryless sum
0  0  0   0  0  0  0  0  1    carry the -3 as -1 0 0.

-