Ok, looks like I misunderstood.
If longitude is in South or latitude in West, multiply the result by –1 (for decimals). So the initial example, but for South and West, would be:
Longitude -23.8802085 = 23.8802085 º S
Latitude -54.8748739 = 54.8748739 º W
The way you get hex values is called "sixteen's complement". To get that value, you'd first have to convert the number to two's complement signed binary. So if you take the number 23.8802085 º S and convert it to binary, you get:
00001110 00111011 11010100 10100101
(I've added the extra zeros in front because longitude and latitude coordinate values take up 4 bytes each and 1 byte consists of 8 bits. So the four zeros that I added "complete" the byte and will be necessary later). Now you invert the values and add 1:
11110001 11000100 00101011 01011011
Now convert the value to hex and you get:
F1C42B5B - Longitude -23.8802085 = 23.8802085 º S
For the West value:
54.8748739 → 00100000 10110101 00111101 11000011 → 11011111 01001010 11000010 00111101 → DF4AC23D
So the final results:
F1C42B5B - Longitude -23.8802085 = 23.8802085 º S
DF4AC23D - Latitude -54.8748739 = 54.8748739 º W
Should be a piece of cake when converting with code as the binary step will probably not be necessary. I hope this helps!