|
|
|
|
IP to Integer
An IP address can be represented by different notations. The most common way to represent an IP address is XXX.XXX.XXX.XXX.
Provide an IP address below to display it in different formats
Converted Values
String value |
18.219.18.238 |
Binary |
00010010 . 11011011 . 00010010 . 11101110 |
Integer |
316347118 |
How to convert
To convert an IP address to integer, break it into four octets. For example, the ip address you provided
can be broken into
First Octet: |
18 |
Second Octet: |
219 |
Third Octet: |
18 |
Fourth Octet: |
238 |
To calculate the decimal address from a dotted string, perform the following calculation.
|
(first octet * 256³) + (second octet * 256²) + (third octet * 256) + (fourth octet) |
= |
(first octet * 16777216) + (second octet * 65536) + (third octet * 256) + (fourth octet) |
= |
(18 * 16777216) + (219 * 65536) + (18 * 256) + (238) |
= |
316347118 |
|
|
|
|