Canonical: https://toolipedia.app/half-precision-bfloat16-and-fixed-point-converter

# Half Precision, bfloat16 and Fixed-Point Converter

Converts numbers to half precision (16-bit), bfloat16 and fixed point Q formats with the bits, hexadecimal value, exact stored number and rounding error, and decodes bits back.

Breadcrumbs: Toolipedia > Developer tools > Code and developer utilities > Half Precision, bfloat16 and Fixed-Point Converter

## About Half Precision, bfloat16 and Fixed-Point Converter

Machine learning and graphics use 16-bit floats. Half precision (binary16) has 5 exponent bits and 10 fraction bits, topping out at 65504; bfloat16 keeps the 8 exponent bits of a 32-bit float but only 7 fraction bits. Fixed point stores a number as an integer scaled by 2^f. Type a number to see the sign, exponent and fraction bits, the hex value, the exact value stored, and the rounding error against your decimal, with round-to-nearest-even. Switch direction to decode a hex pattern such as 3C00, which is 1 in half precision.

## How to use Half Precision, bfloat16 and Fixed-Point Converter
1. Choose half precision, bfloat16 or fixed point, and type a decimal number.
2. For fixed point set the integer bits, fraction bits and whether the number is signed.
3. Read the bits, hex and rounding error, or switch direction to decode hexadecimal bits.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- half precision bfloat16 and fixed point converter
- half precision converter
- bfloat16 converter
- float16 to decimal
- fixed point q format converter
- binary16 hex to float

## Frequently asked questions

### How does bfloat16 differ from half precision?

Both use 16 bits. Half precision spends 5 on the exponent and 10 on the fraction for finer precision but a small range, while bfloat16 spends 8 and 7 for the range of a 32-bit float but coarser steps.

### What does Q3.12 mean?

Conventions differ. Here Q3.12 means 3 integer bits and 12 fraction bits, plus a sign bit for signed values, giving 16 bits in total with a step of 2 to the power minus 12.

### What happens when a value is too large?

Floating formats round it to infinity once it passes the largest finite value, 65504 for half precision. Fixed point saturates to its nearest limit and tells you the value was clamped.

### Is Half Precision, bfloat16 and Fixed-Point Converter free?

Yes. Half Precision, bfloat16 and Fixed-Point Converter on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

## Related tools

More free tools that go well with Half Precision, bfloat16 and Fixed-Point Converter:
- [Floating point error calculator](https://toolipedia.app/floating-point-error-calculator)
- [Bit Field and Register Decoder](https://toolipedia.app/bitfield-register-decoder)
- [Date Format String Builder](https://toolipedia.app/date-format-string-builder)
- [Bitwise Calculator](https://toolipedia.app/bitwise-calculator)
- [Bloom Filter Calculator](https://toolipedia.app/bloom-filter-calculator)
