I'm working with a third party server that takes ints as an input argument. However, when query the value I've written again, it seems to use the leftmost bit of the number as sign.. so 1000...0 (16 bits) would be returned as -32768, 11000...0 would be -16384, etc.
Given that Java doesn't know uints, I'm looking for an effective way to turn my negative number into the right positive number (the first one being 2^15, the second one being 2^15 + 2^24, and so on).