How do I know whether to perform twos complement forwards or backwards?
Sometimes it’s not superbly clear, but two’s complement can be performed the same way regardless of whether you’re converting from positive to negative or vice versa. So to decode a negative number, you flip the bits and add 1…just as if you were encoding the positive equivalent. Remember: do not complement a positive number to encode it.