How to convert IEEE-11073 16-bit SFLOAT to simple float in Java?

IEEE-11073 is not in public domain but you can find sufficient information in Bluetooth personal health profiles. Google up with full spec# 11073-2060. Following is copy paste from a bluetooth personal health transcoding paper:

The following information is defined in ISO/IEEE Std. 11073-2060™1-2008 [1].

The SFLOAT-Type data type is defined to represent numeric values that are not integer in type. The SFLOAT-Type is defined as a 16-bit value with 12-bit mantissa and 4-bit exponent. See Annex F.8 of [1] for a thorough definition of the SFLOAT-Type. This data type is defined as follows:

Exponent Mantissa
Size 4 bit 12 bit

16-bit float type; the integer type is a placeholder only

SFLOAT-Type ::= INT-U16

The 16–bit value contains a 4-bit exponent to base 10, followed by a 12-bit mantissa. Each is in twos-complement form.

Special values are assigned to express the following:

  • NaN [exponent 0, mantissa +(2^11 –1) → 0x07FF]
  • NRes [exponent 0, mantissa > –(2^11) → 0x0800]
  • INFINITY [exponent 0, mantissa +(2^11 –2) →
    0x07FE]
    – INFINITY [exponent 0, mantissa –(2^11 –2) → 0x0802]
  • Reserved for future use [exponent 0, mantissa –(2^11 –1) → 0x0801]

Leave a Comment