Hexadecimal

Hexadecimal (also known as base-16 or simply hex) is a positional numeral system that represents numbers using a radix (base) of sixteen. Unlike the decimal system representing numbers using ten symbols, hexadecimal uses sixteen distinct symbols, most often the symbols "0"–"9" to represent values 0 to 9 and "A"–"F" to represent values from ten to fifteen.

Software developers and system designers widely use hexadecimal numbers because they provide a convenient representation of binary-coded values. Each hexadecimal digit represents four bits (binary digits), also known as a nibble (or nybble).[1] For example, a 6-bit byte can have values ranging from 000000 to 111111 (0 to 63 decimal) in binary form, which can be written as 00 to 3F in hexadecimal.

In mathematics, a subscript is typically used to specify the base. For example, the decimal value 711 would be expressed in hexadecimal as 2C716. In programming, several notations denote hexadecimal numbers, usually involving a prefix. The prefix 0x is used in C, which would denote this value as 0x2C7.

Hexadecimal is used in the transfer encoding Base 16, in which each byte of the plain text is broken into two 4-bit values and represented by two hexadecimal digits.

  1. ^ "The hexadecimal system". Ionos Digital Guide. Archived from the original on 2022-08-26. Retrieved 2022-08-26.