Encode
Text → bytes
| Encoding | Bytes | Length |
|---|
Number → bytes
Whole numbers (
-42, 0xFF, 0b1010) or decimals (3.14, 1e-3, Infinity, NaN)
| Type | Big-endian | Little-endian |
|---|
Word order Modbus registers, PLCs
The number above as 32- and 64-bit values in the four common byte orders. Modbus sends 16-bit registers big-endian; many devices put the low word first (word swap).