# IEEE-754 Analysis

You must have JavaScript enabled to do anything with this web page.

## Instructions

This page lets you examine the relationships among binary and decimal numbers and three number formats described by the IEEE-754-2008 floating-point standard. You can enter a numeric value in any one of five formats, and see all five corresponding values (Decimal, Normalized Binary, Binary32 (single precision), Binary64 (double precision), and Binary128 (quad precision), along with analyses of the binary structure of the floating-point formats.

You can create multiple analyzers 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.

### Input Formats

• ##### Auto

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`.

• ##### Decimal

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

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 basic IEEE-754-2008 standard 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

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:

• a - Auto input format
• d - Decimal input format
• b - Binary input format
• h - Hexadecimal input format
• l - Little-endian hexadecimal input
• ↑ - Round towards positive infinity
• ↓ - Round towards negative infinity
• 0 - Round towards zero
• n - Round to nearest
• v - Enter value

Analyzer 1 Input Format
Rounding Mode
Value to analyze:

Syntax Entered: none

Decimal value: 0

Normalized binary value: 0

Binary32: --

Status Sign  Exponent  Significand 
--- - (-) -- (--) -- (--)

Binary64: --

Status Sign  Exponent  Significand 
--- - (-) -- (--) -- (--)

Binary128: --

Status Sign  Exponent  Significand 
--- - (-) -- (--) -- (--)