To get the best deal on Tutoring, call 1-855-666-7440 (Toll Free)
Top

Hexadecimal Conversion

Hexadecimal system is a 16-base number system whose digits are the possible remainders of division by 16. The digits used for Hexadecimal representation are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.  As a single digit cannot consist of two digits, the remainders 10, 11, 12, 13, 14 and 15 are correspondingly represented by the upper case letters A, B, C, D, E and F.

It is often required to convert Hexadecimal representation to Decimal form and vice versa.
 
The stuff on this page gives the method for such conversions.

Related Calculators
Adding Hexadecimal Numbers Calculator Binary to Hexadecimal Calculator
Convert Decimal to Hexadecimal Calculator Hexadecimal to Decimal Calculator
 

Hexadecimal Conversion Method

Back to Top
How to write a Hexadecimal number in decimal form?
The suffix 16 at the end of a number indicates that a hexadecimal number. To convert a hexadecimal number into decimal form, each digit is multiplied by its place value and the sum of all such products gives the decimal number required.

Here the place values in a hexadecimal representation are powers of 16, 160 (=1), 161, 162, 163   etc.
The power is incremented by 1 as the places are counted from right to left.

Example: Convert F2A516 into decimal form.
Solution: The place values from left to right are 163, 162, 161 and 1. The decimal form is given by the sum of the products of a digit and its corresponding place values. Remember F = 15 and A = 10.

              Hex to Dec

F2A5 = 15 x 163 + 2 x 162 + 10 x 161 + 5 x 1
= 15 x 4096 + 2 x 256 + 160 + 5
= 61,440 + 512 + 160 + 5
= 62,11710.

How to convert a decimal number into Hexadecimal form?
The hexadecimal digits required are got by successive division of the number and the quotients by 16. This can be achieved in two ways.

Method 1:
Let us consider the decimal number 184310.
Divide 1843 by 16. We get 1843 = 16 x 115 + 3.  This means the quotient is 115 and the remainder is 3.
Digit in Units place = 3.
Divide the quotient got in the division again by 16. We get 115 = 16 x 7 + 3. Quotient = 7 and remainder = 3
Digit in 16's place = 3
As the quotient in the last division is less than 7, the division by 16 cannot be continued and 7 is taken as the next digit.
Digit in 162  place = 7
Thus 184310 = 73316.

Method 2:
The number is first divided by the highest power of 16 possible. The quotient is taken as the digit corresponding to that place value and the division is continued with the remainder by a lesser power of 16.
Example:
Consider the decimal number 528710.
163 = 4096 < 5287.  Hence the first divisor chosen is 4096 (=163).
Divide 5,287 by 4096 .  5,287 = 4096 x 1 + 1191.
Digit in 163 place = 1
Divide the remainder 1191 by the next lower power of 16, that is 162 = 256.
1191 = 256 x 4 + 167
Digit in 162 place = 4
Divide the remainder 167 by 16.   169 = 16 x 10 + 7
Digit in 16's place = A  (corresponding to quotient 10).
Digit in Unit's place = 7 (the last remainder).
Thus 528710 = 14A716.

*AP and SAT are registered trademarks of the College Board.