I have couple of addresses like this - 

```
19.22.145.103
20.52.175.104
19.92.192.102
11.20.175.108

```

I want to create a unique number for each of the above IP Address. I was doing it this way - 

Sum of each octet 19 + 22 + 145 + 103 = 289 as the unique number.

But by this we might have same number for some IP Addresses since we are just summing the octet.

```
19.22.145.103 = 289
20.52.175.104 = 351
19.22.147.101 = 289
11.20.175.108 = 314

```

As you can see above, `289` is coming for two IP Address with my algorithm for summing the octets which is not what I want. I need a unique number which is short data type for each ip address.

Is there any better way to do this with some other formula? I thought my algorithm will guarantee uniqueness.