IEEE 11073 SFLOAT Converter
Encode numeric measurements into the 16-bit IEEE 11073 SFLOAT format or decode raw SFLOAT hexadecimal values into signed mantissa, decimal exponent and represented measurement value. Special NaN, NRes, infinity and reserved patterns are detected separately.
Value = Mantissa × 10^Exponent. This is not IEEE 754 binary
floating point.
| Field | Bits | Raw | Signed / Decoded | Meaning |
|---|
—
What Is IEEE 11073 SFLOAT?
IEEE 11073 SFLOAT is a compact 16-bit decimal floating-point representation used in personal-health-device and Bluetooth health-data contexts. It is different from IEEE 754 Binary16 or Float32 because its scale is a power of ten rather than a power of two.
The 16 bits are divided into a four-bit signed exponent and a twelve-bit signed mantissa. Both fields use two’s-complement representation. :contentReference[oaicite:1]{index=1}
IEEE 11073 SFLOAT Formula
Value = Mantissa × 10^Exponent
Mantissa:
12-bit signed two's complement
Exponent:
4-bit signed two's complement
Exponent range:
-8 to +7The exponent is decimal. An exponent of −1 means the mantissa is multiplied by 0.1, while an exponent of +2 means it is multiplied by 100.
16-Bit SFLOAT Bit Layout
15 12 11 0
+--------------+----------------------------------+
| Exponent | Mantissa |
+--------------+----------------------------------+
4 bits 12 bitsThe raw 16-bit value can therefore be assembled as:
SFLOAT =
((Exponent & 0x0F) << 12)
|
(Mantissa & 0x0FFF)SFLOAT Mantissa Range
The twelve-bit two’s-complement mantissa has a raw signed range from −2048 through +2047. Some exponent-zero mantissa patterns are reserved for special values rather than ordinary numbers. :contentReference[oaicite:2]{index=2}
12-bit signed range:
-2048 through +2047SFLOAT Exponent Range
The four-bit exponent is signed using two’s complement.
Binary Signed Exponent
0000 0
0001 +1
...
0111 +7
1000 -8
...
1111 -1Example: Encode 114
The Bluetooth SIG’s IEEE 11073 transcoding example represents a systolic blood pressure value of 114 with exponent zero and mantissa 114. :contentReference[oaicite:3]{index=3}
Value = 114
Mantissa = 114
Exponent = 0
114 × 10^0
= 114
Mantissa Hex:
0x072
SFLOAT:
0x0072Example: Encode 36.4
Value:
36.4
Choose:
Mantissa = 364
Exponent = -1
364 × 10^-1
= 36.4
Exponent -1:
4-bit two's complement = 1111
Mantissa 364:
0x16C
SFLOAT:
0xF16CDecode SFLOAT 0xF16C
Raw SFLOAT:
0xF16C
Exponent field:
0xF
= -1
Mantissa field:
0x16C
= 364
Value:
364 × 10^-1
= 36.4IEEE 11073 SFLOAT Special Values
Five exponent-zero representations have assigned non-numeric meanings. The Bluetooth GATT specification lists the following medfloat16/SFLOAT patterns. :contentReference[oaicite:4]{index=4}
| Raw SFLOAT | Meaning |
|---|---|
| 0x07FE | Positive Infinity |
| 0x07FF | NaN — Not a Number |
| 0x0800 | NRes — Not at this Resolution |
| 0x0801 | Reserved for Future Use |
| 0x0802 | Negative Infinity |
What Does NRes Mean?
NRes means Not at this Resolution. It is a defined special SFLOAT value rather than an ordinary numeric measurement. Its 16-bit value is 0x0800. :contentReference[oaicite:5]{index=5}
0x0800
→ NRes
→ Not at this ResolutionSFLOAT Is Not IEEE 754 Half Precision
The name SFLOAT can be misleading if it is assumed to mean IEEE 754 half precision. IEEE 11073 SFLOAT uses a decimal exponent and signed integer mantissa, while IEEE 754 Binary16 uses a binary exponent, sign bit and fraction field.
IEEE 11073 SFLOAT:
M × 10^E
IEEE 754 Binary16:
sign × binary significand × 2^EBluetooth SFLOAT Byte Order
A 16-bit SFLOAT value may be displayed as one hexadecimal word, while a raw Bluetooth characteristic is encountered as individual octets. This calculator shows both big-endian visual byte order and little-endian byte order so packet data can be interpreted without reversing bytes manually.
SFLOAT Word:
0xF16C
Big-endian byte display:
F1 6C
Little-endian bytes:
6C F1Why Decimal Resolution Matters
One purpose of this encoding is to retain meaningful measurement resolution. For example, 36.4 can naturally be encoded as mantissa 364 with exponent −1, which represents one decimal place of resolution.
36.4
M = 364
E = -1
Resolution:
10^-1 = 0.1The calculator’s automatic encoder therefore considers the number of decimal places entered by the user before falling back to another valid exponent when necessary.
SFLOAT Encoding Error
Not every arbitrary real number can be represented exactly using an integer 12-bit mantissa and an exponent limited to −8 through +7. When an exact representation is unavailable, the encoder finds the closest available ordinary SFLOAT value and reports the numerical encoding error.
Encoding Error =
Represented Value - Input ValueNegative SFLOAT Values
Negative measurements are represented using a negative two’s-complement mantissa, a negative exponent, or both as mathematically required.
Value:
-12.5
One representation:
Mantissa = -125
Exponent = -1
-125 × 10^-1
= -12.5IEEE 11073 SFLOAT Converter FAQs
How many bits is IEEE 11073 SFLOAT?
How many bits are used for the mantissa?
How many bits are used for the exponent?
What is the SFLOAT exponent range?
What base does SFLOAT use?
What does 0x0072 decode to?
What does 0x07FF mean?
What does 0x0800 mean?
What is positive infinity in SFLOAT?
What is negative infinity in SFLOAT?
What does 0x0801 mean?
Is IEEE 11073 SFLOAT the same as IEEE 754 Float16?
Can SFLOAT encode negative numbers?
Can every decimal number be represented exactly?
Encode and Decode IEEE 11073 SFLOAT Values
Convert health-device measurements between decimal values and exact 16-bit SFLOAT representations while inspecting signed mantissa, decimal exponent, special-value codes and byte order.