2's complement only works in one direction with the LSM303DLHC
Are you sure it jumps to 4096 and not 4095?

In any case, the problem is that you're not properly converting the 12-bit result to the native Java int type. Try this:

int x = ((h) &lt;&lt; 8) | (l);
if (x &gt; 2047) {
    x = x - 4096;
}


Any values that have the high bit (bit 11) set will be properly converted to negative integers. 4095 becomes -1, 4094 becomes -2, etc.