# Inverted values - digital resolution issue?

first of all, I am not a technician, but I would really appreciate your helping with one (I hope simple or trivial) issue. I recorded a signal (skin conductance level - SCL, uS unit) with my device - 16 bit, range of the measured SCL is 1-20 uS.

In a recording software I changed digital upper range - "digital maximum" - from 1024 to 65536 (minimum = 0).

The issue is that when I record the signal and the signal reaches about the half of the physical maximum (the range the device can measure SCL = 1-20uS), from the recorded signal I see something like "inverted-across-zero" values, they have negative values but as it is from oscilatory parts obvious, when the signal is lower than the bound about 10,5 uS then it is above zero value, when it exceeds 10,5 uS it become inverted and the values are (deposited) under zero axis.

Can this "phenomenon" be caused due to my stupid change of digital maximum to 65536? Thank you for any help!

M.

This looks like a "signed number" problem.

An unsigned binary number with n bits has a range from 0 to 2^n -1

But a Signed number weights the MSB as -2^(n-1) so the range is -2^(n-1) to 2^(n-1) -1

Consider an unsigned signal going from 0 to 255 being viewed as though it was a 2's complement number. Notice how it would look as though it flips from +127 to -128 and continue up to -1 (255 corresponds to -1).

Is that what you're seeing?

I notice that you're max digital value is 65536. But the maximum value a 16 bit unsigned number can hold is 65535 .. 2^16 -1

Yes. It appears your method of "seeing" a sample is limited to a maximum of 32767 (typical for 16-bit signed twos-complement number representations or formats), so a larger sample value (anything larger than 32767 up to your setting of 65536) won't fit, and will thus be seen as a wrong value.

You can fix this at least in two ways. Decrease the max range, or use a sample storage and display number format that can display larger values (32-bit floats, for instance).