Numbers and Bases

literal numbers in various bases can be specified using prefixes before the number

RadixNamePrefixDigits
2Binary0b[01]
3Ternary0t[012]
4Quaternary0q[0123]
6Seximal0s[0-5]
8Octal0o[0-7]
10Decimal*0d[0-9]
12Dozenal0z[0-9xXeE]
16Hexidecimal0x[0-9A-Fa-f]
32Duotrigesimal0u[0-9A-Va-v]
36Hexatrigesimal0r[0-9A-Za-z]
64Tetrasexagesimal0y[0-9A-Za-z!$]

*Decimal is the default base, so the prefix is generally not necessary, unless the default base is changed.

Some examples:

See also: Base names, and Seximal

Examples