Hexadecimal Number

Pronunciation: /ˌhɛk səˈdɛs ə məl ˈnʌm bər/ ?

A hexadecimal number is a number written using the hexadecimal numeration system. The hexadecimal numeration system is a base 16 numeration system. The 16 hexadecimal digits are used:

Table 1: Hexadecimal digits
The letters used for hexadecimal digits with a value of 10 through 16 are always capital letters, never lower case letters.

The place values of hexadecimal numerals are multiples of 16, just as the place values of decimal numerals are multiples of 10.

PlacePlace Value
1160 = 1
2161 = 256
3162 = 4096
4163 = 65536
5164 = 1048576
6165 = 16777216
7166 = 268435456
8167 = 4294967296
Table 2: Hexadecimal place values.


There are several different ways that are used to identify a series of hexadecimal digits as a hexadecimal number. Some of these are:

  • Literature - 0FD816 - A subscripted '16' is often appended to the hexadecimal digits to distinguish them from numerals in other bases.
  • HTML - ڊ - The characters '&#x' precede the hexadecimal digits and the character ';' follows them.
  • C, C#, C++ programming languages - 0x309A - The characters '0x' precede the hexadecimal digits.
  • Visual basic - &H3x0F - The characters '&H' precede the hexadecimal digits.

How to convert a decimal integer to a hexadecimal integer

Converting a decimal integer to a hexadecimal integer involves several steps:

  1. Find the highest hexadecimal place value;
  2. Divide the decimal integer by the hexadecimal place value. Record the hexadecimal digit; and
  3. Use the remainder from step 2 for the next place value.

1n/a12530Convert the decimal number 12530 to hexadecimal.
2n/a12530Using the table of place values above, the largest place value less than or equal to 12530 is 4096.
33242Divide 12530 by 4096. The result is 3R242. The first hexadecimal digit is 3. The next digit will be found using 242.
430242Divide 242 by 256. The result is 0R242. The second hexadecimal digit is 0. The next digit will be found using 242.
530F2Divide 242 by 16. The result is 15R2. Using the table of hexadecimal digits above, the digit for 1510 is F. The third hexadecimal digit is F. The next digit will be found using 2.
630F2n/aSince the next place value is 1, simply copy the 2 to the end of the hexadecimal number. 1253010 = 30F216
Table 3: Converting a decimal number to a hexadecimal number.

How to convert a hexadecimal integer to a decimal integer

When converting a hexadecimal integer to a decimal integer, use the decimal values of the hexadecimal digits in table 1 and the place value table, table 2.

130F216Convert the hexadecimal number 30F216 to decimal.
23, 0, 15, 2Convert each hexadecimal digit to its value.
33×4096, 0×256, 15×16, 2×1Multiply the decimal value of each digit by its place value.
43×4096 + 0×256 + 15×16 + 2×1 = 12530Add the products together to get the decimal value.
Table 4: Converting a hexadecimal integer to a decimal integer.

Cite this article as:

Hexadecimal Number. 2010-10-25. All Math Words Encyclopedia. Life is a Story Problem LLC. http://www.allmathwords.org/en/h/hexadecimalnumber.html.

Image Credits

Revision History

2010-10-25: Initial version (McAdams, David.)

All Math Words Encyclopedia is a service of Life is a Story Problem LLC.
Copyright © 2005-2011 Life is a Story Problem LLC. All rights reserved.
Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License