Just add 2^15 instead of bit-anding which is irritating in signed java
land