FP8 8-Bit Floating Point

FP8 Converter

Convert decimal values to an 8-bit floating-point representation or decode an FP8 bit pattern back to decimal. Choose E4M3 or E5M2 format and inspect the sign, exponent, fraction, binary and hexadecimal representation.

8 Bits E4M3 E5M2 Decimal ↔ FP8 Binary Hex
FP8 Floating-Point Converter 8-bit
Enter a decimal value such as 1.5 or -2.25.
FP8 Result
Decimal Value
FP8 Binary
Hexadecimal
Format
Sign Bit
Exponent Bits
Fraction Bits
True Exponent
FP8 Bit Layout

What Is FP8?

FP8 is an eight-bit floating-point representation designed for numerical workloads where reducing memory use, data movement and computational cost is more important than retaining high precision.

Unlike larger floating-point formats, FP8 provides very few bits for both exponent and fraction information. Two widely discussed layouts are E4M3 and E5M2.

FP8 E4M3 and E5M2

Format Sign Exponent Fraction Bias
E4M3 1 bit 4 bits 3 bits 7
E5M2 1 bit 5 bits 2 bits 15

E4M3 dedicates more of its limited bit budget to significand precision, while E5M2 dedicates more bits to the exponent and therefore supports a wider exponent range.

FP8 Bit Layout

E4M3:
S | EEEE | FFF

E5M2:
S | EEEEE | FF

The first bit is the sign. The following bits contain the biased exponent, and the remaining low-order bits store the fraction.

Decimal to FP8 Example

The decimal value 1.5 can be represented exactly in both layouts because its normalized binary value is 1.1 × 2⁰.

1.5 in normalized binary:
1.1 × 2^0

E4M3:
0 | 0111 | 100

Complete:
00111100

Hex:
3C

Why FP8 Rounds Values

FP8 stores only two or three explicit fraction bits depending on the selected format. Consequently, many ordinary decimal values cannot be represented exactly.

The converter selects the nearest representable finite FP8 value for decimal inputs. The decoded result therefore may differ slightly from the original decimal value.

Why FP8 Matters in AI Computing

Low-precision floating-point representations are increasingly relevant to machine-learning computation because large neural-network workloads move and process enormous quantities of numerical data.

Reducing each value to eight bits can substantially reduce storage and bandwidth requirements compared with 16-bit or 32-bit representations when the workload and hardware support the selected FP8 format.

This calculator focuses only on understanding and converting the underlying FP8 numeric representation.

E4M3 vs E5M2

Property E4M3 E5M2
Total bits 8 8
Exponent bits 4 5
Fraction bits 3 2
Exponent bias 7 15
Main trade-off More precision More exponent range

Important FP8 Notes

Important: FP8 is not one universal bit layout.

This calculator supports E4M3 and E5M2 layouts.

E4M3 contains 1 sign bit, 4 exponent bits and 3 fraction bits.

E5M2 contains 1 sign bit, 5 exponent bits and 2 fraction bits.

Because FP8 precision is very limited, decimal-to-FP8 conversion frequently requires rounding.

Exact handling of the highest exponent patterns can vary among specific FP8 standards and hardware implementations. This educational converter uses conventional IEEE-like finite/subnormal/infinity/NaN interpretation for the selected bit layout.

FP8 Converter FAQs

What is FP8?
FP8 is an eight-bit floating-point representation used for low-precision numerical computation.
What does E4M3 mean?
E4M3 means the representation uses four exponent bits and three fraction bits, in addition to one sign bit.
What does E5M2 mean?
E5M2 uses five exponent bits, two fraction bits and one sign bit.
Which FP8 format has more precision?
E4M3 has one additional fraction bit and therefore provides greater significand precision.
Which FP8 format has a wider exponent range?
E5M2 has five exponent bits and therefore provides a wider exponent range.
Why does an FP8 result differ from my decimal input?
Only a limited set of values can be represented with eight bits, so most values must be rounded.
Is FP8 the same as FP16?
No. FP8 uses eight total bits, while FP16 uses sixteen and provides considerably greater precision and range.
Is FP8 used in AI?
FP8 formats are used in modern low-precision numerical and machine-learning computation where supported by hardware and software.
Scroll to Top