| ||||||||
|
|
Tech Help menu SciFiOne main menu Hex (hexidecimal) Explained![]() By John T Burt, Feb 25, 1997 "What Is Hex?" Hex stands for hexadecimal. At its simplest, hex numbers are base 16 (decimal is base 10). Instead to counting from 0 to 9, as we do in decimal, and then adding a column to make 10, counting goes from 0 to F before adding a column. The characters A through F represent the decimal values of 10 through 15 as illustrated below. decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F Counting proceeds like this. 0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 and up as far as one wants to go, just like any other number. Another way to explain hex is, each column in a hex number represents a power of 16. (In decimal each column represents a power of 10.) There's more about this below. "Why Use Hex?" Hex is used because it is the easiest way to represent the value of a standard 8 bit binary computer byte, and there are a lot of those around that need to be represented. "What Is Binary?" Binary numbers are base 2. In binary counting only goes from 0 to 1 before adding a column. It's illustrated below. As you will see, it takes a lot of space to represent a small value in binary. decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 binary 0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111 Another way to put it is each column in a binary number represents a power of 2. There's more about this below. "How Is Hex Used?" Four binary bits can be represented as a single hex digit as follows.
Thus the eight binary bits of a standard byte can be represented as two simple hex digits as illustrated in the drawing below. There's no way to do this as "elegantly" in decimal. ![]() Binary, Decimal and Hex as Powers.
Related subject - Hex Addition
SciFiOne. Content sharing and copyrights.12/15/03 - Information.
|
|