How conversion works
IPv4 contains four eight-bit octets. To convert to an integer, multiply the first octet by 256³, the second by 256², the third by 256, and add the fourth.
Worked example
For 10.0.0.1: 10 × 16,777,216 + 1 = 167,772,161. Its hexadecimal form is 0x0A000001. Leading zeros are preserved in its 32-bit binary representation.