Download the PHP package carrontiger/conversion without Composer
On this page you can find all versions of the php package carrontiger/conversion. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download carrontiger/conversion
More information about carrontiger/conversion
Files in carrontiger/conversion
Package conversion
Short Description Conversion from/to decimal numerals.
License Apache-2.0
Informations about the package conversion
Conversion
Conversion from/to decimal numerals
Comparison of Converters
Examples
Converter | Result of toDecimal() |
Result of fromDecimal() |
---|---|---|
BinaryConverter |
2147483647 | 1111111111111111111111111111111 |
OctalConverter |
2147483647 | 17777777777 |
HexadecimalConverter |
2147483647 | 7FFFFFFF |
CaseInsensitiveAlphaDecimalConverter |
2147483647 | ZIK0ZJ |
CaseSensitiveAlphaDecimalConverter |
2147483647 | 2LKcb1 |
AsciiDecimalConverter |
2147483647 | Rll}& |
Meta Information
Converter | Base | “Digits” |
---|---|---|
BinaryConverter | 2 | 01 |
||
OctalConverter | 8 | 01234567 |
||
HexadecimalConverter | 16 | 0123456789ABCDEF |
||
CaseInsensitiveAlphaDecimalConverter | 36 | 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ |
||
CaseSensitiveAlphaDecimalConverter | 62 | 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz |
||
AsciiDecimalConverter | 94 | 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!"#$%&'()*+,-./:;<=>?@[\]^_`{\|}~ |
Individual Examples
Binary Numerals
Conversion of decimal numeral to a binary numeral
Conversion of binary numeral to a decimal numeral
Octal Numerals
Conversion of decimal numeral to a octal numeral
Conversion of octal numeral to a decimal numeral
Hexadecimal Numerals
Conversion of decimal numeral to a hexadecimal numeral
Conversion of hexadecimal numeral to a decimal numeral
Case-Insensitive Alpha-Decimal Numerals
The case-insensitive alpha-decimal numeral encoding uses the following 36 “digits”:
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
Conversion of decimal numeral to a case-insensitive alpha-decimal numeral
Conversion of a case-insensitive alpha-decimal numeral to a decimal numeral
Case-Sensitive Alpha-Decimal Numerals
The case-sensitive alpha-decimal numeral encoding uses the following 62 “digits”:
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
Conversion of decimal numeral to a case-sensitive alpha-decimal numeral
Conversion of a case-sensitive alpha-decimal numeral to a decimal numeral
ASCII-Numerals
The ASCII numeral encoding uses the following 94 “digits”:
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!"#$%&'()*+,-./:;<=>?@[\]^_`{\|}~
Due to the use of non-alphabetic characters, it is not practical for ASCII numerals to be embedded in texts or be used as plain HTTP query arguments, for example. One purpose would be to encode large integer numbers, compactly. But most of all, this is an example of an arbitrary numeral system, than one can define.
If you were to define a numeral system (by extending the AbstractDecimalConverter
class),
be advised, to use only one-byte characters as digits.