Are you looking for coordinate hashing? The normal equation is:
hash = y * width + x
(in your case it would probably be x * height + y)
So if your hash size is a signed 32 bits then sqrt(2,147,483,647) would give the width value, in this case 46340. This defines are min as (-46340, -46340). The max would be (46340, 46340).
-46340 * 46340 + -46340 = -2,147,441,940, and minimum signed int in 32 bits is -2,147,483,648
46340 * 46340 + 46340 = 2,147,441,940 and maximum signed int in 32 bits is 2147483648
For large ranges of x and y you can usually just use a 64 bit.
If you know bitwise operators you can just assign low and high bits to x and y. So in a 64-bit number you'll store the x in the top 32 and y in the lower 32. This will generate a hash that follows your rules.