I have worked on the floating point library for the 8051. This is a converter I wrote in QuickBasic 4.5 to convert a floating number entered on the PC to floating point representation that can be understood by the micro controller. See if it will help you move ahead in your quest.

To the best of my recollection, the format is
8 bits biased exponent followed by 24 bits signed mantissa.

The idea is to move the mantissa till you get a 1 bit in the highest position of the mantissa and accordingly change the exponent by the amount you moved the mantissa. Then remove the highest bit (it is implicit) and put in the sign bit for the mantissa. A 1 bit here means it is a negative number.

That's all I can offer right now. I am a bit hazy on the details at the moment as it has been more than 10 years ago that I did this. If you need any help, let me know and I'll try to help.



Code:
DIM Mant AS SINGLE, Expo AS INTEGER
DIM bits AS INTEGER, Sign AS INTEGER

PRINT "CFLT converter for text to float51 format"
INPUT "Please enter the number : ", num

IF num < 0 THEN
  Sign = 1
  num = -num
END IF

Mant = num
Expo = &H80 + 24
FOR bits = 1 TO 24
  IF (Mant AND &H800000) THEN EXIT FOR
  Mant = Mant * 2
  Expo = Expo - 1
NEXT

'remove the MSB if +ve
IF Sign = 0 THEN
  Mant = Mant AND &H7FFFFF
END IF

PRINT "The floating point representation is  Exp, Mantissa"
PRINT HEX$(Expo); ", "; HEX$(Mant)