Cisco IPv6 Hexadecimal to Decimal

 

How to Convert Hexadecimal to Decimal

 

By Charles Ross CCNP #CSCO10444244

 

 

I wrote this article because lately I’ve been receiving a lot of emails from IPv6 enthusiasts asking me the question “How do I convert Hexadecimal to Decimal without using a calculator?”

 

Now, although the procedure may sound hard to perform, it’s rather easy to do; all you have to do is perform the following steps:

 

Steps:

 

  1. Locate the “last digit” of the hexadecimal number that you want to convert. (the last digit of a hexadecimal number is the digit that is farthest to the right).

 

  1. Once, you have identified the last digit; you will then multiply the “last digit” with (16^0). In other words, in step number two you are going to multiply the value of the “last digit” with (16 to the power of zero).

 

Example: “last digit value” x (16^0) = “last digit value” 

Note, that the power of 0 of any number is always 1.

 

Once, you have performed the formula on the last digit, write down the result; and then move on to the previous digit on the left.

 

  1. Each time you move on to a previous digit, you’ll need to increase the power (16^X) of the formula by 1 before performing the formula on that digit.

 

  1. Simply perform the formula (digit value x (16^X) on all of the remaining digits until all digit results have been written down.

 

  1. Then add (sum) all of the written down (stored) results together to get the final answer number.


Here’s an example: 

We are converting the HEXADECIMAL number FB8 to DECIMAL (the number 8 is the “last digit”)

 

  1. 8 x (16^0) = 8

  2. B x (16^1) = 176

  3. F x (16^2) = 3840

  4. 8 + 176 + 3840 = 4024

 

So, the decimal equivalent of the hexadecimal number FB8 is 4,024.

 

Here’s another example: 

We are converting the HEXADECIMAL number 7747 to DECIMAL (the number 7 is the “last digit”)

 

  1. 7 x (16^0) = 7

  2. 4 x (16^1) = 64

  3. 7 x (16^2) = 1792

  4. 7 x (16^3) = 28672

  5. 7 + 64 + 1792 + 28672 = 30535

 

So, the decimal equivalent of the hexadecimal number 7747 is 30,535.

 

Below is a quick reference of the powers of 16:

 

16^0 = 1

16^1 = 16

16^2 = 256

16^3 = 4096

16^4 = 65536

16^5 = 1048576

 

 

To your success,

 

Charles Ross

 

CCNP #CSCO10444244

 

www.ciscoipv6ittechtips.com