Bfloat16 16 Bits 1 / 8 / 7 Layout Bias 127 NaN & Infinity
BF16 Floating-Point Decoder

BF16 Hex to Binary Converter

Convert a hexadecimal BF16 bit pattern into exact 16-bit binary and decode its 1-bit sign, 8-bit exponent and 7-bit fraction. The calculator identifies normal values, subnormals, signed zero, infinity and NaN using the bfloat16 floating-point layout.

Exact BF16 bits 8-bit exponent 7-bit fraction Special-value decoding
BF16 Hex → Binary
● LIVE
Raw bfloat16 pattern · 0000–FFFF · optional 0x prefix · normalized to exactly 4 hex digits
EXACT BF16 BINARY S | EEEEEEEE | FFFFFFF
0011111110000000
Sign: 0 Exponent: 01111111 Fraction: 0000000 Class: Normal
BF16 value: 1
BF16 BREAKDOWN 1 sign · 8 exponent · 7 fraction bits
3F80 → 0 | 01111111 | 0000000 · exponent 127 − bias 127 = 0 · value = 1
TRY:
Format Bfloat16 / BF16
Width 16 bits / 2 bytes
Sign 1 bit
Exponent 8 bits · bias 127
Fraction 7 stored bits

BF16 Hex to Binary Converter

The BF16 Hex to Binary Converter converts a hexadecimal bfloat16 bit pattern into exactly sixteen binary digits and decodes its floating-point meaning.

BF16 uses one sign bit, eight exponent bits and seven fraction bits. Although it occupies the same 16-bit storage width as FP16, its internal field layout is substantially different.

Example: hexadecimal 3F80 becomes 0011111110000000. Splitting the pattern as 0 | 01111111 | 0000000 gives the BF16 value 1.0.

What Is BF16?

BF16, short for bfloat16, is a 16-bit floating-point format designed with an 8-bit exponent field and a 7-bit stored fraction.

BF16 layout: S EEEEEEEE FFFFFFF Sign: 1 bit Exponent: 8 bits Fraction: 7 bits Total: 16 bits

BF16 Bit Layout

Field Bits Role
Sign 1 Positive or negative
Exponent 8 Scale with bias 127
Fraction 7 Stored significand fraction
Total 16 Complete BF16 word

How to Convert BF16 Hex to Binary

The hexadecimal-to-binary part is exact: every hexadecimal digit converts to four binary bits. Four hex digits therefore form the complete BF16 word.

3F80 3 → 0011 F → 1111 8 → 1000 0 → 0000 Binary: 0011111110000000 BF16 fields: 0 | 01111111 | 0000000

How Normal BF16 Values Are Decoded

A normal finite BF16 value has an exponent field between 00000001 and 11111110. The exponent uses a bias of 127 and the significand has an implicit leading one.

Value = (-1)^sign × (1 + fraction / 128) × 2^(exponent – 127)

Example: 3F80 BF16 Equals 1

3F80 → 0011111110000000 Fields: 0 | 01111111 | 0000000 Stored exponent: 127 Unbiased exponent: 127 − 127 = 0 Fraction: 0 Significand: 1 Value: 1 × 2⁰ = 1

Example: 4000 BF16 Equals 2

4000 → 0100000000000000 Fields: 0 | 10000000 | 0000000 Stored exponent: 128 Unbiased exponent: 128 − 127 = 1 Value: 1 × 2¹ = 2

Example: C000 BF16 Equals -2

C000 → 1100000000000000 Fields: 1 | 10000000 | 0000000 Sign: negative Exponent: 128 − 127 = 1 Value: -2

Common BF16 Hex Values

Hex Binary Classification Value
0000 0000000000000000 Positive zero +0
8000 1000000000000000 Negative zero -0
3F80 0011111110000000 Normal 1
4000 0100000000000000 Normal 2
4040 0100000001000000 Normal 3
C000 1100000000000000 Normal -2
7F7F 0111111101111111 Normal ≈3.3895313892515355e38
0080 0000000010000000 Normal ≈1.1754943508222875e-38
0001 0000000000000001 Subnormal ≈9.183549615799121e-41
7F80 0111111110000000 Infinity +Infinity
FF80 1111111110000000 Infinity -Infinity
7FC0 0111111111000000 NaN NaN

BF16 Exponent Bias

The eight-bit exponent field uses bias 127 for normal values.

Unbiased exponent: stored exponent − 127 Example: 10000000₂ = 128 128 − 127 = 1

BF16 Fraction and Significand

Normal BF16 values have a hidden leading one. The seven stored fraction bits represent multiples of 1/128.

Normal significand: 1 + fraction / 128 Example fraction: 1000000₂ = 64 Significand: 1 + 64/128 = 1.5

BF16 Subnormal Numbers

When all eight exponent bits are zero and the seven fraction bits are not all zero, the pattern represents a subnormal number. No implicit leading one is used.

BF16 subnormal: (-1)^sign × (fraction / 128) × 2^-126

Smallest Positive BF16 Subnormal

0001 → 0 | 00000000 | 0000001 Fraction: 1 Value: (1 / 128) × 2^-126 = 2^-133 ≈ 9.183549615799121e-41

Smallest Positive Normal BF16 Value

0080 → 0 | 00000001 | 0000000 Stored exponent: 1 Unbiased exponent: 1 − 127 = -126 Value: 2^-126 ≈ 1.1754943508222875e-38

Maximum Finite BF16 Value

7F7F → 0 | 11111110 | 1111111 Stored exponent: 254 Unbiased exponent: 127 Significand: 1 + 127/128 = 1.9921875 Value: ≈ 3.3895313892515355e38

BF16 Positive and Negative Zero

BF16 retains IEEE-style signed zero patterns.

Hex Binary Meaning
0000 0000000000000000 +0
8000 1000000000000000 -0

BF16 Infinity

An exponent field of 11111111 and a zero fraction represents infinity.

7F80 → 0 | 11111111 | 0000000 → +Infinity FF80 → 1 | 11111111 | 0000000 → -Infinity

BF16 NaN

If the exponent field contains all ones and the fraction field is non-zero, the pattern represents NaN.

7FC0 → 0 | 11111111 | 1000000 Exponent: all ones Fraction: non-zero Result: NaN

BF16 vs FP16

BF16 and FP16 both use sixteen bits, but they divide those bits differently. This creates different precision and exponent-range characteristics.

Property BF16 FP16
Total width 16 bits 16 bits
Sign bits 1 1
Exponent bits 8 5
Fraction bits 7 10
Exponent bias 127 15
Hex for 1.0 3F80 3C00
Do not decode a BF16 word using FP16 field boundaries. The same 16 raw bits can represent very different values depending on the floating-point format.

BF16 vs FP32

BF16 uses the same 8-bit exponent width and exponent bias of 127 associated with binary32, but it stores far fewer fraction bits.

That structure gives BF16 a broad exponent range while using only two bytes per value.

BF16 vs UInt16

A UInt16 converter interprets every bit as unsigned integer magnitude. BF16 divides those same sixteen bits into floating-point fields.

Hex: 3F80 UInt16 interpretation: 16256 BF16 interpretation: 1.0

BF16 vs Int16

Int16 uses two’s-complement integer semantics, while BF16 uses sign-exponent-fraction floating-point semantics.

C000 Raw binary: 1100000000000000 Int16: -16384 BF16: -2

Optional 0x Prefix

One standard hexadecimal 0x or 0X prefix may be entered.

0x3F80 → 3F80 → 0011111110000000 → BF16 1

Common Uses for BF16

  • Machine-learning training workloads.
  • Neural-network inference.
  • Tensor and matrix processing.
  • AI accelerators.
  • GPU and TPU numerical workloads.
  • Compact floating-point storage.
  • Model weight inspection.
  • Low-level numerical debugging.
  • Binary model-file analysis.
  • Floating-point format education.

Common BF16 Conversion Mistakes

  • Decoding BF16 with the FP16 1/5/10 field layout.
  • Using exponent bias 15 instead of 127.
  • Assuming BF16 has 10 fraction bits.
  • Treating the hexadecimal pattern as UInt16.
  • Applying an implicit leading 1 to subnormal values.
  • Treating exponent 11111111 as a normal exponent.
  • Ignoring signed zero, infinity or NaN.
  • Assuming BF16 and FP16 have the same representable range.

BF16 Hex to Binary Converter FAQs

What is BF16?
BF16, or bfloat16, is a 16-bit floating-point format containing one sign bit, eight exponent bits and seven stored fraction bits.
How many bits are in BF16?
BF16 contains exactly 16 bits and occupies two bytes.
What is 3F80 in BF16?
3F80 converts to 0011111110000000 and represents exactly 1.0.
What is 4000 in BF16?
4000 converts to 0100000000000000 and represents exactly 2.0.
What is C000 in BF16?
C000 converts to 1100000000000000 and represents -2.0.
What is the BF16 exponent bias?
The normal BF16 exponent field uses a bias of 127.
What is the maximum finite BF16 value?
Hex 7F7F is the largest positive finite BF16 pattern and is approximately 3.3895313892515355e38.
What is the smallest positive normal BF16 value?
Hex 0080 represents 2^-126, approximately 1.1754943508222875e-38.
What is the smallest positive BF16 subnormal?
Hex 0001 represents 2^-133, approximately 9.183549615799121e-41.
What is 7F80 in BF16?
7F80 represents positive infinity.
What is 7FC0 in BF16?
7FC0 is a NaN pattern because its exponent is all ones and its fraction is non-zero.
Is BF16 the same as FP16?
No. BF16 uses an 8-bit exponent and 7-bit fraction, while FP16 uses a 5-bit exponent and 10-bit fraction.

Convert BF16 Hex to Binary

Enter a raw hexadecimal BF16 pattern from 0000 through FFFF and select Decode BF16. The calculator maps the four hexadecimal digits to exactly sixteen binary bits, separates the sign, exponent and fraction fields, applies the BF16 exponent bias of 127 and identifies normal numbers, subnormals, signed zeros, infinities and NaN values.

Scroll to Top