IEEE-754 Floating Point Converter

Convert decimal numbers, hexadecimal values, and IEEE-754 floating-point representations used by PLCs, Modbus devices, FieldServer gateways, instrumentation, and automation systems.

This calculator focuses on the common 32-bit single-precision format and shows the underlying sign, exponent, mantissa, hexadecimal representation, and 16-bit register values.

Convert Floating Point Values

Select the representation you currently have.
Used when converting hexadecimal or 16-bit registers.
Enter a decimal floating-point value.

Conversion Result

IEEE-754 Binary
Hexadecimal
Sign
Exponent
Mantissa
16-bit Registers

What Is IEEE-754?

IEEE-754 is a standard used to represent floating-point numbers in binary. It allows computers, PLCs, controllers, and other digital systems to represent values containing fractional components.

The most common format encountered in industrial automation is the 32-bit single-precision floating-point format.

32 Bits = Sign + Exponent + Mantissa

1 bit + 8 bits + 23 bits

32-Bit IEEE-754 Structure

Field Bits Purpose
Sign 1 Positive or negative
Exponent 8 Controls the binary scale
Mantissa 23 Contains the significant digits
S | EEEEEEEE | MMMMMMMMMMMMMMMMMMMMMMM

The exponent uses a bias of 127 in the standard 32-bit representation.

Worked Example

Consider the decimal value:

1.0

Its 32-bit IEEE-754 representation is:

Binary: 00111111100000000000000000000000

Hex: 0x3F800000

The first bit is zero because the number is positive. The exponent represents the appropriate binary scale, while the mantissa represents the significant portion of the value.

Floating Point Values in Modbus

Modbus registers are 16 bits wide, while a 32-bit floating-point value requires two consecutive 16-bit registers.

For example, a 32-bit floating-point value might be represented as:

Register 1 = upper 16 bits
Register 2 = lower 16 bits

However, the order in which the device presents the bytes and words is not necessarily the same between manufacturers or devices.

Byte Order and Word Swapping

This is one of the most common reasons a valid floating-point value appears as an unexpected number when reading industrial data.

A 32-bit value contains four bytes:

A B C D

Common arrangements include:

Format Order Description
ABCD A B C D Normal byte order
BADC B A D C Bytes swapped within each word
CDAB C D A B 16-bit words swapped
DCBA D C B A Bytes and words reversed

When troubleshooting a Modbus floating-point value, verify the manufacturer's register map and the byte/word-order settings of the receiving PLC, gateway, or FieldServer.

PLC and FieldServer Troubleshooting

Suppose a device documentation says that a process value is stored as a 32-bit IEEE-754 floating point number across two Modbus registers.

If the receiving system displays a value that is obviously incorrect, do not immediately assume that the transmitter or device is malfunctioning.

Check the data representation first:

  1. Confirm that the device actually uses IEEE-754 floating point.
  2. Confirm whether the value is 32-bit or 64-bit.
  3. Confirm which two registers contain the value.
  4. Determine the manufacturer's byte and word order.
  5. Compare the raw register values with the expected floating-point value.
  6. Verify the receiving driver's configuration.

Common Floating-Point Mistakes

  1. Reading a float as an integer. The same 32 bits can represent completely different numerical values depending on how they are interpreted.
  2. Using the wrong byte order. A correct IEEE-754 value can appear meaningless if the bytes are arranged incorrectly.
  3. Forgetting word swapping. Two 16-bit Modbus registers may need to be exchanged before interpreting the combined value.
  4. Assuming all Modbus devices use the same float order. Always verify the device documentation.
  5. Confusing 32-bit and 64-bit floating point. A 64-bit value requires four 16-bit registers rather than two.

Practical Field Workflow

When troubleshooting a floating-point value from an instrumentation device:

Device → Modbus Registers → Byte / Word Order → IEEE-754 Conversion → PLC / Gateway → Engineering Value

Capture the raw register values before changing configuration. This gives you a known reference that can be compared against the device documentation and the receiving system.

If changing the byte or word order suddenly produces a physically reasonable value, that is a strong indication that the data representation was configured incorrectly. The device documentation should still be used to confirm the correct configuration.

Important Note About Register Values

A 16-bit Modbus register is normally represented as an unsigned value from 0 through 65535. Two such registers can be combined into a 32-bit value.

32-bit Value = (Register 1 × 65536) + Register 2

The resulting 32-bit bit pattern is then interpreted according to the IEEE-754 standard.

The exact register numbering, byte order, word order, and floating-point format are device-specific. Always verify the manufacturer's documentation before configuring a live control system.

Related Calculators