How to convert a number from unsigned to signed?
signed: -32768 to 32767 unsigned: 0 to 65535
I am solving the problem in JavaScript. The situation is that I
Just test if the number is over halfway, then subtract the modulus.
if(x > 32767) {x = x - 65536;}