Enter Number


About this Base Converter

Base-2 to base-62 are accepted. "A" stands for 10, "Z" for 35, "a" (lower-case) for 36 and "z" (lower-case) for 61. Decimals are supported. This is a custom function because PHP's base_convert() doesn't accept decimals and only goes up to base-36. It's only as precise as PHP is, so chances are the smallest decimals won't be correct.

Is there any standard for displaying numbers higher than base-36? I've used lowercase letters to go up to base-62, but I couldn't find if that's what is commonly done. (Then again, I guess nothing is commonly done, since anything beyond base-16 doesn't really have much use, to my knowledge.)

Fun game: Enter your name and supply base-36 (or higher) as the starting base and see what number you get in another base. For instance, my first name in base-38 returns EPKCO in base-42.

What's this about?
A base is the system with which numbers are displayed. If we talk about base-n, the system has n characters (including 0) available to display a number. Numbers are represented with digits which are smaller than n. Therefore, 3 in base-3 is 10: because that system doesn't have a "3", it starts over (1, 2, 10, 11, 12, 20, 21, 22, 100, etc.).

The base we usually use is base-10, because we have 10 (when including 0) digits until we start over again (8,9,10). In base-2 (binary), we only have 2 characters, i.e. 0 and 1, until we start over again. Following this example, the binary number 10 is 2 in our (base-10) system.

Does it make sense that a finite fraction ("decimal") is infinite in another base?
It totally does. If you want to convert 645 from base-8 to base-10, you do 6*82 + 4*81 + 5*80 = 421. After the comma you keep on decrementing the exponent, meaning that if you have 21.35 in base-7 you get to its base-10 equivalent by doing 2*71 + 1*70 + 3*7-1 + 5*7-2. 7-1 (= 1/7), however, is 0.142857... in base-10, while it's simply written as 0.1 in base-7.