I am asking the question even though it has been answered before because I am looking at 3 different pages with 3 different answers right now.
I am wondering how to convert a negative decimal with a fraction, for example
$$-37.125$$
to binary and to hex in two's complement form.
I understand how to do this with a positive number, and I understand how to convert whole numbers into two's complement form.
From what I can tell, the process for the whole number will remain the same (convert to binary, switch zeros with ones, and add one).
However, I have no idea what to do for the fractional negatives because it doesn't seem like you can just treat it as a positive fraction and I tried converting it a couple of times into two's complement but can't get the proper answer by just switching zeros or something similar.
The answer needs to be represented in the form with the Most Significant Bit being a 1 to show it is negative. So the respective conversions would be
$$-37.125 \to 0b11011010.11100000 \to 0xDA.E0$$
Any hints to go to and from binary would suffice, since to and from hex is the same process once you know the binary.
Thank you very much for any help!