- Base 36
Base 36 is a positional numeral system using 36 as the
radix . The choice of 36 is convenient in that the digits can be represented using the Arabic numerals 0-9 and the Latin letters A-Z. Base 36 is therefore the most compactcase-insensitive alphanumeric numeral system usingASCII characters, although itsradix economy is poor. (Compare withbase 16 andbase 64 .)From a
mathematical viewpoint, 36 is a convenient choice for a base in that it is divisible by both 2 and 3, and by their multiples 4, 6, 9, 12 and 18. Each base 36 digit can be represented as two base 6 digits.The most common
latinate name for base 36 seems to be hexatridecimal, although sexatrigesimal would arguably be more correct. The intermediate form hexatrigesimal is also sometimes used. For more background on this naming confusion, see the entry forhexadecimal . Another name occasionally seen for base 36 is alphadecimal, aneologism coined based on the fact that the system uses the "decimal" digits and the letters of the Latin "alpha"bet.Examples
Conversion table:
Conversion
32- and 64-bit integers will only hold up to 6 or 12 base-36 digits, respectively. For numbers with more digits, one can use the functions "mpz_set_str" and "mpz_get_str" in the GMP arbitrary-precision math library. For floating-point numbers the corresponding functions are called "mpf_set_str" and "mpf_get_str".
Python Conversion Code
Uses in practice
The
Remote Imaging Protocol forbulletin board system s used base 36 notation for transmitting coordinates in a compact form. ManyURL redirection systems likeTinyURL also use base 36 integers as compact alphanumeric identifiers. Various systems such asRickDate use base 36 as a compact representation of Gregorian dates in file names, using one digit each for the day and the month.References
External links
* [http://www.wordwizard.com/phpbb3/viewtopic.php?f=16&t=17971 A discussion about the proper name for base 36] at the Wordwizard Clubhouse
* [http://primes.utm.edu/notes/words.html The Prime Lexicon] , a list of words that areprime number s in base 36
* [http://www.tonymarston.net/php-mysql/converter.html A Binary-Octal-Decimal-Hexadecimal-Base36 converter] written inPHP
* [http://www.geocities.com/xulfrepus/folder/base.html A website that can convert numbers between bases from 2 to 36]
Wikimedia Foundation. 2010.