Skip to content

IEEE 754 Converter

See a float’s sign, exponent, mantissa and its exact decimal value.

A decimal number, or a bit pattern written as 0x3FB999999999999A to go the other way.

Precision

Quick Tool Overview

The IEEE 754 Converter prints the exact decimal value a float really holds — all fifty-five digits of it for 0.1 — rather than the rounded one your language displays, which is the actual answer to why 0.1 + 0.2 is not 0.3.

What it does
Decomposes a float into its IEEE 754 fields
You give it
A number, or a bit pattern as 0x…
You get back
Sign, exponent, mantissa and the exact value
Best for
Understanding floating point, and debugging it
Developer Tools Free, unlimited use No sign-up Runs in your browser

About the IEEE 754 Converter

Pull a floating-point number apart: the sign bit, the exponent, the mantissa, the hexadecimal pattern, and — most usefully — the exact decimal value those bits actually represent, rather than the rounded one your language prints.

That exact value is the answer to the question everyone eventually asks. 0.1 stored as a double is really 0.1000000000000000055511151231257827021181583404541015625, because one tenth is a repeating fraction in binary just as one third is in decimal, and it has to be cut off somewhere. Add two of those approximations together and the small errors survive into the result — which is the whole of why 0.1 + 0.2 does not equal 0.3. The converter also gives the next representable value in each direction, which is the size of the gap at that magnitude.

Key features of the IEEE 754 Converter

The exact value, in full

0.1 is really 0.1000000000000000055511151231257827021181583404541015625. Computed with big integers, so it is exact rather than another approximation.

Every field separated

Sign bit, exponent with its bias removed, and mantissa with the implied leading 1 explained.

Three precisions

Half, single and double — useful when a value survives float64 and collapses in float32.

Both directions

Enter a decimal to get the bits, or a hex pattern to get the value back.

The neighbouring values

The next representable number up and down, which is the size of the gap at that magnitude.

How to use the IEEE 754 Converter

  1. 1

    Enter a number

    A decimal value, or a bit pattern written as 0x… to go the other way.

  2. 2

    Choose a precision

    Half, single or double — 16, 32 or 64 bits.

  3. 3

    Read the fields

    Sign, exponent and mantissa, separated and explained.

  4. 4

    Look at the exact value

    The full decimal expansion, and how far it sits from what you typed.

Frequently asked questions

Because neither 0.1 nor 0.2 is exactly representable in binary. Each is stored as the nearest double, their tiny errors add, and the sum lands one step away from the double nearest 0.3. Print the exact values here and it stops being surprising.

Reviews of the IEEE 754 Converter

What people who use the IEEE 754 Converter think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the IEEE 754 Converter. It takes half a minute and no account.

Write the first review

More developer tools