Byte and word order (ABCD, BADC, CDAB, DCBA)

Big-endian and little-endian, why a 32-bit value in two Modbus registers can be read four ways, and how to find the correct order quickly.

Endianness

Big-endian stores or transmits the most significant byte first, little-endian the least significant byte first. The number 0x12345678:

OrderBytes in memory / in the frame
big-endian12 34 56 78
little-endian78 56 34 12

The Modbus specification defines big-endian only for one 16-bit register: the high byte goes first in the frame. It does not define how 32- and 64-bit values are spread over several registers — each manufacturer decides. Hence four common variants.

ABCD notation

The bytes of a 32-bit value are labelled from most to least significant: A is the highest, D the lowest. Example — FLOAT32 123.456 = 0x42F6E979 (A=42, B=F6, C=E9, D=79):

NotationRegister 1Register 2Other names
ABCD42F6E979big-endian, "as is"
BADCF64279E9byte swap
CDABE97942F6word swap — common for meters and drives
DCBA79E9F642little-endian, byte + word swap

Finding the order on site

  1. Pick a parameter with a known value from the device documentation (rated frequency 50.00 Hz, a voltage, serial number, firmware version).
  2. Read both registers in hex.
  3. Enter them in the Byte / Word Order tool and pick the variant that gives a sensible result. For FLOAT32 the correct variant is usually the only one with a plausible magnitude — the others give 1e-38, 3e+21 or NaN.
  4. Record the order in the communication specification — for one device it is the same for all 32-bit parameters.

Signs of a wrong order:

  • the value jumps while the process changes slowly — words are swapped, the low word changes faster;
  • an integer value is a multiple of 65,536 — low and high words are swapped;
  • small positive values turn into huge negative numbers.

Off by one register

If none of the four orders gives a meaningful number, check the address: you may be off by one (zero- vs one-based numbering), and the register pair straddles half of a neighbouring parameter. See Modbus addressing.

Tools

Loading the map…

Sources

  1. MODBUS Application Protocol Specification V1.1b3 — Modbus Organization
  2. IEEE 754-2019 Standard for Floating-Point Arithmetic — IEEE

Updated 2026-10-01