Numerical Bases

Numerical bases are the method by which a value is represented. Most values are represented using Base 10, which essentially consists of digits zero through nine. This however is not the only method of representing a value. There are many other forms of numerical representation, some of which are supported below.

Binary

A numerical value representing Base 2 and consists only of values zero and one. Counting from zero through to ten, the binary values would look like 0, 01, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010. A binary value is coded with a "%" symbol prefix to inform the compiler that the value is binary. In binary, the value ten would be coded %1010.

Octal

A numerical value representing Base 8 and consists of values zero through seven. Counting from zero through to ten, the octal values would look like 00, 01, 02, 03, 04, 05, 06, 07, 10, 11, 12. An octal value is coded with a "0c" prefix to inform the compiler that the value is octal. In octal, the value ten would be coded 0c12.

Hexadecimal

A numerical value representing Base 16 and consists of values 0 through F. Counting from zero through to twenty, the hexadecimal values would look like 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F, 10, 11, 12, 13, 14. A hexadecimal value is coded with a "0x" prefix to inform the compiler that the value is hex. In hexadecimal, the value twenty would be coded 0x14.