This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

float to 48 bit hex conversion

hi, i'm working on a project where i need to convert a float value to 48 bit hex. Can any one tell me the procedure for this conversion in keil.

these are some samples:

12.00 = 840000000040

21.48 = 8500000AD72B

257.89 = 890000ECF100

Parents Reply Children
  • Ah, yes. There will only be 8 hex characters.

    I know that Turbo Pascal had a 6-byte data type implemented in software, besides the 32-bit, 64-bit and 80-bit types supported by the 80x87 instructions.

    To create a hex dump using a 6-byte fp format, you will have to decode the bits of the mantissa and exponent and convert from 32-bit to 48-bit format before dumping as hex.