I'm still pretty new at this. I'm working on accepting data from a module that sends a number in two bits. I'm told it is positive or negative according to two's complement. While I understand the concept, what do I have to do with the arduino to go from a two-bit two's complement number to an int?
The signed int variables used in Arduino already uses twos complement for negative numbers. To convert a positive number to a negative number in twos complement you invert all the bits and add 1.
I think to convert a 2 bit signed number to a 16 bit signed number you just have to set the extra 14 higher bits to one if the second bit of the smaller number is a one, but not really sure.