You must have JavaScript enabled to do anything with this web page.
This page lets you examine the relationships among binary and decimal values and the three basic binary floating-point formats specified by the IEEE-754-2019 standard: binary32 (single-precision), binary64 (double-precision), and binary128 (quad-precision). The IEEE-754-2019 standard also specifies other representations for floating-point values that are not covered here, but the three basic binary formats match the data types for real numbers supported by most programming languages.
You can create multiple analyzer-converters so you can compare multiple values at the same time. Adding an analyzer will automatically hide these instructions. You can always toggle these instructions on/off using the Hide/Show Instructions button at the top of the page.
Each analyzer-converter accepts a numeric value in entered in any one of five formats, and shows five corresponding values (Decimal, Normalized Binary, binary32, binary64, and binary128. Each binary floating-point is accompanied by an analysis of its field values.
If the auto option is checked, you can enter a value in any of the formats listed below.
If you enter a valid decimal number, it will be treated as such even though it might also be a valid binary or hexadecimal number. For example, 10101010 could be a decimal number (10,101,010); a binary number (170); or it could be a 32-bit hexadecimal value (Binary32 representation of approximately 2.84E-29).
In ambiguous cases, use the other three radio buttons to force the value to be interpreted using the format you want.
In Auto mode, the analyzers will also accept the following “values” as inputs:
NaN, qNaN, sNaN, Infinity, +Infinity,
and -Infinity
.
You can enter decimal numbers as whole numbers (123), decimal fractions (123.456), rational numbers (22/7). or mixed numbers (1 7/8). The number may be signed, and you can use exponential notation, including for the parts of rational and mixed numbers. For example, 1.23e2 is the same as 123, and 1e3 1e2/7e1 is the same as 1000 100/70. Note that the components of rational and mixed numbers must be integers, so negative exponents are not allowed even when the component would evaluate to an integer. For example, 10e-1/7 (10 times 10 to the negative 1, over 7) would have to be entered as 1/7.
Binary numbers may be signed whole numbers or binary fractions with an optional exponent. Write the exponent in decimal, but it will be base 2. (101.1e-1 is the same as 101.12×2-1 = 10.112, for example.) You may use 'B' or 'b' to indicate the exponent instead of 'E' or 'e'—but the exponent will still be interpreted as a decimal number.
The analyzer recognizes the three IEEE-754-2019 standard’s binary floating-point formats: Binary32, (commonly called “single-precision”); Binary64, (commonly called “double-precision”); and Binary128 (commonly called “quad precision”). Enter exactly 8, 16, or 32 hexadecimal digits to enter a value in one of these formats.
When the Hexadecimal input format is selected, you have the option of using “little-endian” byte ordering, with the most significant byte on the right rather than on the left.
Keyboard shortcuts are under development. The following are available now:
The Esc key shows/hides these instructions. The Q key shows the FAQ. The Y key adds an analyzer.
Analyzer 1 supports the following keyboard shortcuts for selecting input elements.
Use the Ctrl key when typing:
Analyzer 1
Decimal value: 0
Normalized binary value: 0
Binary32: --
Status | Sign [1] | Exponent [8] | Significand [23] |
---|---|---|---|
--- | - (-) | -- (--) | -- (--) |
Binary64: --
Status | Sign [1] | Exponent [11] | Significand [52] |
---|---|---|---|
--- | - (-) | -- (--) | -- (--) |
Binary128: --
Status | Sign [1] | Exponent [15] | Significand [112] |
---|---|---|---|
--- | - (-) | -- (--) | -- (--) |