We can simply add 0x800800800 to the encoding, then use bit masking.
This works because adding 0x800 maps -2048:2047 to 0x000:0xFFF.
And 0x800800800 is (0x800 << 24 + 0x800 << 12 + 0x800) for x,y,z.
After bitmasking, -0x800 restores the original value range.