If you’re given a positive 16-bit hex value and asked to provide the hex representation of its negative value, it is otherwise asking for the 16-bit 2’s complement of the given value.
So, for example if you’re given 1D7A in hex and asked for representing -1D7A simply take its 2’s complement.
- Convert to binary: 1D7A = 0001 1101 0111 1010
- Flip the 1’s and 0’s: 1110 0010 1000 0101
- Add 1: 1110 0010 1000 0101 + 1 = 1110 0010 1000 0110
- Convert back to hex: E286
Therefore, the representation of -1D7A in hex is E286.
