Number Bases

math

= 0.33333…
so 3×

= 0.9999…;
but 3×

is also

= 1.0.
It becomes more obvious if we allow for additional numerals,
such as letting “a” represent ten, “b” eleven, and so on.
Then 1b1 = 1×10^{2} + 11×10^{1} + 1×10^{0} =
2×10^{2} + 1×10^{1} + 1×10^{0} = 211.

The structure beneath Arabic numerals.

Thanks to the success of Arabic numerals and decimal notation, we are all familiar with numbers like 42 and 3.14159…. Due to the popularity of computer circuitry, we’ve all heard about binary and that it is 0s and 1s. I hope to share a bit about how these are related and about the other elements of this field.

Consider a number like 534.12 (in decimal).
This notiation means
5×10^{2} +
3×10^{1} +
4×10^{0} +
1×10^{–1} +
2×10^{–2}.
Note that the “10” here is totally arbitrary and is called the base of the number system.
In base 8 (often called “octal”) the same numerals would mean
5×8^{2} +
3×8^{1} +
4×8^{0} +
1×8^{–1} +
2×8^{–2},
which is the same number as 348.15625 in decimal.

It is also true, though not obvious, that numbers are not unique in any given base. In decimal, for example,

1 |

3 |

1 |

3 |

1 |

3 |

3 |

3 |

It is also true that if a base is a power of another base
it can be seen as groupings of digits.
We do this already with things like 2,456,233
which can be thought of as a base-1000 number
2×1000^{2} + 456×1000^{1} + 233×1000^{0}.
Similarly, the binary number 1001010111101010101001
can be grouped like 10,0101,0111,1010,1010,1001
and each group written in base 16 to get 257aa9.

Two bases are particularly bad.
These are base 1, which is just tick-marks, and base 0, which can only represent the number 0.
But other than that any number goes, even fractions.
For example, in base 9.5 the number 42 represents 4×9.5^{1} + 2×9.5^{0}, wich is just fourty.

A particular oddity comes from bases between 0 and 1,
which just reverse the represenation in bases larger than 1.
The base 0.1 reveals this well:
534.12 in base 0.1 is 214.35 =
2×0.1^{2} +
1×0.1^{1} +
4×0.1^{0} +
3×0.1^{–1} +
4×0.1^{–2}.
Thus, in base 0.1 the result of 1 ÷ 3 is …33330

Negative bases are possible too, via the same logic.
For example, in base -10 the number 214.35 =
2×(–10)^{2} +
1×(–10)^{1} +
4×(–10)^{0} +
3×(–10)^{–1} +
4×(–10)^{–2} = 193.94.
With negative bases there’s no need for a sign (+ or –) because that is encoded in the number of digits the number has.
Odd-numbered digits are positive while even-numbered digits are negative
so 5134 is a negative number (–4926) because its leading digit is in an even place.

Finally, I offer a little javascript base converter. I didn’t make it handle negative bases, but the rest it should do fine.

base: | |

value: | |

Loading user comment form…

Looking for comments…