See also Hex, Decimal, Binary number
Hexadecimal (hex for short) is a positional numeral system for representing a numeric value as base 16. For the most common convention, a digit is represented as "0" to "9" in the same way as decimal and as a letter of the alphabet from "A" to "F" (either upper or lower case) for the digits with decimal value 10 to 15.
As typical computer hardware is binary in nature and 16 is a power of 2, the hex representation is often used in computing as a dense representation of binary information. A hex digit represents 4 contiguous bits–known as a nibble. An 8-bit byte is two hex digits, such as
2C.Special notation is often used to indicate that a number is hex. In mathematics, a subscript is typically used to specify the base. For example, the decimal value 491 would be expressed in hex as 1EB16. In computer programming, various notations are used. In C and many related languages, the prefix
0xis used. For example,0x1EB.