IPv6 Training (Cisco) – How to Convert Hexadecimal to Decimal
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:
- 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).
2. 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 (your) left.
3. 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.
4. Simply perform the formula (digit value x (16^X) on all of the remaining digits until all digit results have been written down.
5. 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”)
- 8 x (16^0) = 8
- B x (16^1) = 176
- F x (16^2) = 3840
- 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”)
- 7 x (16^0) = 7
- 4 x (16^1) = 64
- 7 x (16^2) = 1792
- 7 x (16^3) = 28672
- 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
I invite you to visit my website were you’ll find the latest information regarding Cisco IPv6 Design and Implementation Techniques.
To your success,
Source by Charles E Ross