# Text to HEX

## Help

### What is HEX?

HEX stands for hexadecimal. Hexadecimal is a number system, that uses 16 digits to represent a particular value. The digits are represented with the 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. Because of the 16 digits it is also called Base-16.

### Where and Why Is Hexadecimal Used?

Hexadecimal is mostly used for human convenience and saving space. Because it uses 16 digits any 8-bit binary number can be represented using only 2 hex digits.

The hexadecimal digits are also shorter than the decimal digits.

Examples:
F4240 = 1,000,000 = 11110100001001000000
3B9ACA00 = 1,000,000,000 = 00111011100110101100101000000000

Because of this feature hex is used for most of the error codes and other values used inside a computer.

Another place hexadecimal is used is as an HTML color code to express a specific color. For example, a web designer would use the hex value FF0000 to define the color red. This is broken down as FF,00,00, which defines the amount of red, green, and blue colors that should be used (RRGGBB); 255 red, 0 green, and 0 blue in this example.

The fact that hexadecimal values up to 255 can be expressed in two digits, and HTML color codes use three sets of two digits, it means there are over 16 million (255 x 255 x 255) possible colors that can be expressed in hexadecimal format, saving lots of space versus expressing them in another format like decimal.