I’m blessed?

Or at least my teacher says so. We’re talking about IP addresses, and I never really thought about them.

So, after class, I email my teacher:

Figured out how to convert ip addresses from dotted-quad to a single 32bit integer. f(x,y) := ((x % 256) * (256 ^ (4 – y))) ip(a,b,c,d) := f(a,1) + f(b,2) + f(c,3) + f(d,4) So, ip(127,0,0,1) == 2130706433.

and she replies with:

You are very blessed…:)

Strange, no?

Comments are closed.