I moved this blog to other domain: https://tech.panshin.me , please update your bookmarks

Monday, April 14, 2008

Converter Ip->Number / Number->Ip

Converter Ip->Number / Number->Ip
Convert IP Address to IP Number
Converter
Ip->Number / Number->Ip
Ip:
Calculate
Clear
Number:
Convert Ip to Ip Number
Ip = AAA.BBB.CCC.DDD
Number = 256^3 * AAA + 256^2 * BBB + 256^1 * CCC + 256^0 * DDD
Convert Ip Number to Ip
Ip -> AAA.BBB.CCC.DDD
Floor - returns the value of a number rounded DOWNWARDS to the nearest integer.
DDD = Number % 256
CCC = Floor(Number / 256) % 256
BBB = Floor(Number / 256^2) % 256
AAA = Floor(Number / 256^3) % 256

2 comments:

Marki said...

I think this is really usefull if you don't know how to calculate it ;)
Thanks!

Joseph said...

Thank you for your great explanation, it was a big help for me.