*

Hex

0x00000000000000000000000000000000

Hex, or hexadecimal, is a base-16 number system. It uses sixteen distinct symbols:

0-9 to represent values zero to nine, A-F to represent values ten to fifteen.

For example, the binary number 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 can be represented as 00000000000000000000000000000000 in hexadecimal.

Binary
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Decimal
0
Hex
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Action

Hex is used in computing because it can represent binary data very compactly and is easier to convert to and from binary than decimal numbers.

Below is a table showing the conversion of binary numbers to hexadecimal:

0000
0
0001
1
0010
2
0011
3
0100
4
0101
5
0110
6
0111
7
1000
8
1001
9
1010
A
1011
B
1100
C
1101
D
1110
E
1111
F

Hexadecimal numbers are also used in web development to represent colors. For example, the color white is represented as #FFFFFF in hexadecimal.

Why Hexadecimal?

  • Hexadecimal simplifies reading and writing binary data. It turns long binary sequences into shorter, manageable numbers.

  • As a base-16 system, which fits perfectly with binary, a base-2 system, because 16 is 24. This means one hex digit can represent exactly four binary digits.

  • Each hex digit corresponds directly to a four-bit binary sequence, making the conversion straightforward.