FP16 IEEE 754 Binary16

FP16 Converter

Convert decimal numbers to IEEE 754 FP16 binary16 representation or decode a 16-bit FP16 pattern back to its numeric value. View the sign bit, exponent field, fraction field and hexadecimal representation.

16 Bits 1 Sign Bit 5 Exponent Bits 10 Fraction Bits IEEE 754
FP16 Binary16 Converter IEEE 754
Enter a decimal number such as 1.5, -14.25 or 65504.
FP16 Result
Decimal Value
FP16 Binary
Hexadecimal
Classification
Sign Bit
Exponent Bits
Fraction Bits
Exponent Value
FP16 Bit Layout
S: – Exponent: —– Fraction: ———-
FP16 Analysis

What Is FP16?

FP16 is a 16-bit floating-point format defined by IEEE 754 and commonly called binary16 or half precision. It represents floating-point numbers using fewer bits than the 32-bit single-precision format.

An FP16 value contains one sign bit, five exponent bits and ten explicitly stored fraction bits. This compact representation reduces storage and data-transfer requirements but also provides less numeric precision and a smaller range than larger floating-point formats.

FP16 Bit Layout

Field Bits Purpose
Sign 1 Determines positive or negative sign
Exponent 5 Stores the biased exponent
Fraction 10 Stores the fractional significand bits
Total 16 Complete IEEE 754 binary16 value
FP16 layout:

S | EEEEE | FFFFFFFFFF

1 sign bit
5 exponent bits
10 fraction bits

Decimal to FP16 Example

Consider the decimal value 1.5. Its normalized binary representation is 1.1 × 2⁰.

Decimal:
1.5

FP16:
0 01111 1000000000

Complete binary:
0011111000000000

Hex:
3E00

The sign bit is zero because the value is positive. The true exponent is zero, which is stored as 15 because binary16 uses an exponent bias of 15. The fraction represents the binary .1 portion.

FP16 Exponent Bias

For normal finite values, FP16 stores an exponent using a bias of 15. The actual exponent is therefore calculated by subtracting 15 from the stored exponent field.

Stored exponent = 15
Bias = 15

Actual exponent:
15 – 15 = 0

Exponent fields consisting entirely of zeros or entirely of ones have special meanings and are not interpreted using the normal-value rule.

Normal and Subnormal FP16 Values

Normal Values

For a normal value, the exponent field is neither all zeros nor all ones. The significand has an implicit leading 1.

Subnormal Values

When the exponent field is zero and the fraction is nonzero, the number is subnormal. Subnormal values allow FP16 to represent numbers closer to zero with reduced precision.

FP16 Special Values

Exponent Fraction Meaning
00000 0000000000 Zero
00000 Nonzero Subnormal number
00001–11110 Any Normal finite number
11111 0000000000 Infinity
11111 Nonzero NaN

FP16 Numeric Range

The largest finite positive binary16 value is 65504. Values larger than the representable finite range may round to infinity when converted to FP16.

The smallest positive normal FP16 value is 2⁻¹⁴, approximately 0.00006103515625. Binary16 also supports smaller positive subnormal values down to 2⁻²⁴.

Largest finite:
65504

Smallest positive normal:
0.00006103515625

Smallest positive subnormal:
0.000000059604644775390625

Why FP16 Is Useful

FP16 stores each floating-point value in only two bytes. That can reduce memory usage and memory bandwidth compared with 32-bit floating-point data.

Half precision is therefore useful in workloads where reduced precision is acceptable and compact numerical representation is valuable. It is commonly encountered in GPU computing, graphics, numerical workloads and machine-learning systems.

This calculator focuses strictly on the FP16 representation itself: converting numbers to binary16 and decoding binary16 bit patterns.

FP16 Rounding

Most ordinary decimal values cannot be represented exactly using only ten stored fraction bits. When this happens, the value must be rounded to the nearest representable FP16 number.

Therefore, converting a decimal value to FP16 and decoding it again can sometimes produce a slightly different decimal value. This is an expected consequence of finite floating-point precision rather than an error in the converter.

Important FP16 Notes

Important: this page converts IEEE 754 binary16 / FP16 values only.

FP16 contains 1 sign bit, 5 exponent bits and 10 stored fraction bits.

The exponent bias for normal FP16 values is 15.

Decimal values may be rounded because FP16 has limited precision.

The maximum finite positive FP16 value is 65504.

Exponent 11111 represents infinity when the fraction is zero and NaN when the fraction is nonzero.

Exponent 00000 represents zero when the fraction is zero and a subnormal number when the fraction is nonzero.

FP16 Converter FAQs

What is FP16?
FP16 is the IEEE 754 binary16 floating-point format. It stores a floating-point value in 16 bits.
How many bits does FP16 use?
FP16 uses exactly 16 bits: one sign bit, five exponent bits and ten fraction bits.
What is the FP16 exponent bias?
The exponent bias for normal binary16 values is 15.
What is the largest finite FP16 value?
The largest finite positive FP16 value is 65504.
Can FP16 represent negative numbers?
Yes. The sign bit distinguishes positive and negative FP16 values.
Can FP16 represent infinity?
Yes. An exponent field of 11111 and a zero fraction represents positive or negative infinity depending on the sign bit.
Can FP16 represent NaN?
Yes. Exponent bits of 11111 with a nonzero fraction represent NaN.
Why does my decimal value change after FP16 conversion?
FP16 has limited precision, so values that cannot be represented exactly are rounded to a nearby representable binary16 value.
What is an FP16 subnormal number?
A subnormal FP16 number has an exponent field of 00000 and a nonzero fraction. It represents very small values near zero with reduced precision.
Is FP16 the same as BF16?
No. Both use 16 total bits, but their exponent and fraction layouts differ. This calculator handles FP16 binary16 only.
Scroll to Top