This page uses JavaScript. Controls will not work unless you have a JavaScript aware browser. Netscape will do.
For now, you can enter a number in any system. Then just click anywhere
outside the edit control box used to input the number. Its equivalent in
other systems will appear in the corresponding text boxes.
It is customary to prefix hexadecimal numbers with 0x and octals with
0. The converter will accept this common notation which is, however, not
necessary.
Please note the following. Representation of a number in a system with base (radix) N may only consist of digits that are less than N.
More accurately, if
(1) | M = akNk+ak-1Nk-1+...+a1N1+a0 |
with 0 <= ai < N we have a representation of M in base N system and write
If we rewrite (1) as
(2) | M = N*(ak+N*(ak-1+N*...))+a0 |
the algorithm for obtaining coefficients ai becomes more obvious. For example, a0=M modulo N and a1=(M/N) modulo N, and so on.
At one stage of conversion I use a built-in function parseInt which does not seem to return whenever this condition is violated by the very first digit. This appears to be a bug in the parseInt function. I am looking into this matter. For now, please follow the rule:
Representation of a number in a system with base (radix) N may only consist of digits that are less than N.
Would you like to have conversions in additional bases?