I am trying to convert an IEEE based floating point number to a MIL-STD 1750A floating point number.
I have attached the specification for both:
I understand how to decompose the floating point 12.375 in IEEE format as per the example on wikipedia.
However, I'm not sure if my interpretation of the MIL-STD is correct.
12.375 = (12)b10 + (0.375)b10 = (1100)b2 + (0.011)b2 = (1100.011)b2 (1100.011)b2 = 0.1100011 x 2^4 => Exponent, E = 4.
4 in normalised 2's complement is = (100)b2 = Exponent
Therefore a MIL-STD 1750A 32 bit floating point number is:
S=0, F=11000110000000000000000, E=00000100
Is my above interpretation correct?
For -12.375, is it just the sign bit that swaps? i.e.:
S=1, F=11000110000000000000000, E=00000100
Or does something funky happen with the fraction part?