Converting negative numbers to hexadecimal number system
I have no idea how they arrived at 0x0D8, maybe a typo? 0x0D8 is only 12 bits, not 16, and its leading bit is 0, so it is a positive number.

One way is to do the conversion is the classic: convert 10'000 to hex: 0x2710. Now invert all bits: 0xD8EF. Finally add 1: 0xD8F0.

Another way is to start with 0x0000 and substract 1 (or add 0xFFFF) for 10'000 times (or substract 10'000 in one go, if you can do that). The result is the same: 0xD8F0.