MooCow
[H]F Junkie
- Joined
- Apr 13, 2000
- Messages
- 8,249
So to my understanding, in hex, A= 10, B = 11, and so on. In order to convert hex to decimal, all you'd have to do is rewrite the digits. However, when it came to converting hex to an IP address, I found out from this example that I had to multiply the first digit by 16, then add that result to the second digit, which was not multiplied by 16. Why is this? Multiply Dx16 + 1 to get 209.
IPv6 to IPv4 conversion
IPv6 to IPv4 conversion
- Lets start with an IPv6 address that can be converted to IPv4:IPv6 address: :190:4E71 - the double colon is zero compression
- Since the IPv6 is in a hexadecimal format we will start with the first number, which is D1 and convert that into decimal. In hexadecimal D=13 and 1=1, so we have1 - 13 units of 16 and 1 unit of 1 = 209
- The second number is: 90. Therefore we have:90 9 units of 16 and 0 units of 1 = 144
- Next number is: 4E.4E 4 units of 16 and 14 units of 1 = 78
- And the last number: 71.71 7 units of 16 and 1 unit of 1 = 113
- IPv4 address after conversion is: 209.144.78.113