Shorts are signed integers, and the largest positive value is 32767 (2^15-1); anything largest than that and it "wraps around" to a negative number.
If you have a short whose bit
pattern represents an unsigned 16-bit number, you can get the non-negative integral value like this:
int nonNegativeValue = shortValue & 0xFFFF;