unsigned values do not allow for negative numbers, where as signed values do. so an unsigned 16-bit value would range from +0..+65535, where as a signed 16-bit value would range from -32768...+32767. "Technically" negative numbers would represent the upper half of the unsigned range if converted directly, which is why if you treat a signed number as unsigned you appear to get a very large value. You could visualize the range value wise as being +0...+65535 for unsigned and signed as +0...+32767,-32768...-1 (i.e. 0x7FFF == +32767 and 0x8000 == -32768, 0xFFFF == -1, and so on.)
Don't know how python handles this. but after a quick search it appears pythons conversion types are already signed, but i don't know what your conversion code looks like.
in c/c++ it would just be the difference between 'signed short' and 'unsigned short'.
Don't know how python handles this. but after a quick search it appears pythons conversion types are already signed, but i don't know what your conversion code looks like.
in c/c++ it would just be the difference between 'signed short' and 'unsigned short'.
Last edited: