Hi all,

I’m working on a problem on Codewars where an IPv4 address is converted

to

binary and then to a 32 bit number, but I don’t know how this happens.

Example

IP: 128.32.10.1

Converted to binary: 10000000.00100000.00001010.00000001

Converted to 32 bit: 2149583361

Now I’m with it on the binary conversion because I know how binary

works.

128 is written as 10000000 in binary, so this makes sense to me so far.

However I’m not sure how 32 bit numbers are constructed, so I have no

idea

how the above binary is then represented as the 32 bit number

2149583361.

Could someone explain how 32 bit numbers are calculated? Thanks!

Adam