Industrial Automation & Middleware

Hex ↔ Decimal, Endianness & Word-Swap Converter

Decode 16/32-bit integers, IEEE 754 floats, and raw binary streams across Big-Endian, Little-Endian, and Word-Swapped PLC registers

Industrial PLC & SCADA Register Decoder

Hex ↔ Decimal, Endianness & Word-Swap Converter

Presets:

32-Bit Integer Endianness

Big-Endian (AB CD / Modbus standard):1094861636
Little-Endian (DC BA / x86 Intel):1145258561
Word-Swap (CD AB / Schneider PLC):1128546626
Byte-Swap (BA DC):1111573571

IEEE 754 Single-Precision Float (32-Bit)

Big-Endian Float:12.14142
Little-Endian Float:781.0352
Word-Swapped Float:196.2549
ASCII String Translation:"ABCD"

Binary Bitstream & Byte Breakdown (4 Bytes / 32 Bits)

01000001 01000010 01000011 01000100
16-bit Big-Endian:16706
16-bit Little-Endian:16961
16-bit Unsigned:16706
32-bit Unsigned:1094861636

Endianness in RFID & Industrial PLC Communications

When integrating RFID fixed readers (such as Impinj Speedway or Zebra FX9600) with industrial PLCs over Modbus TCP, Ethernet/IP, or PROFINET, data byte ordering is the single most frequent cause of corrupted tag numbers and faulty SCADA triggers.

32-Bit Register Byte Ordering Comparison (Value: 0x12345678)

Endianness Mode Byte Sequence Hex Representation Target Platforms / Protocols
Big-Endian (ABCD) B0, B1, B2, B3 12 34 56 78 Standard Modbus TCP, TCP/IP Network Byte Order, Motorola 68k, Siemens S7-300/400
Little-Endian (DCBA) B3, B2, B1, B0 78 56 34 12 x86/x64 Architecture, ARM Cortex (native), Windows/Linux C# and C++ memory
Word-Swapped / Mid-Little (CDAB) B2, B3, B0, B1 56 78 12 34 Schneider Modicon PLCs, ABB Totalflow, Omni Flow Computers, Enron Modbus
Byte-Swapped / Mid-Big (BADC) B1, B0, B3, B2 34 12 78 56 Legacy Honeywell / Yokogawa DCS serial RTU bridges

IEEE 754 32-Bit Single-Precision Floating Point Decomposition

Industrial sensors (such as RFID temperature logging loggers or RSSI signal power meters) store fractional telemetry values in IEEE 754 format:

// IEEE 754 32-bit Floating Point Equation

Bit 31: Sign bit (S) → 0 = positive, 1 = negative

Bits 30-23: Biased Exponent (E, 8 bits) → Actual Exponent = E - 127

Bits 22-0: Mantissa / Fraction (M, 23 bits) → Normalized Value = 1 + M

// Float Value Formula:

Value = (-1)^S × 2^(E - 127) × (1 + ∑ (b_i × 2^-i))

Frequently Asked Questions

What is Word-Swapping (Mid-Little Endian) in Modbus and PLC systems?
In 32-bit Modbus communications, data spans two consecutive 16-bit registers (4 bytes total). Standard Big-Endian (Motorola format) transmits byte sequence [Byte 0, Byte 1, Byte 2, Byte 3]. Word-Swapped (Mid-Little Endian) sends the low 16-bit register first: [Byte 2, Byte 3, Byte 0, Byte 1]. PLCs like Schneider Modicon, Omni Flow Computers, and Enron Modbus frequently use word-swapped registers.
Why do RFID reader hex numbers look inverted in certain ERP databases?
This is caused by byte endianness mismatch. Fixed RFID readers (such as Zebra FX9600 or Impinj Speedway) stream tag EPCs in network byte order (Big-Endian). If an edge gateway or C# middleware reads raw byte arrays into an x86/x64 memory structure (which is natively Little-Endian) without byte reversal, the hex output will be byte-reversed.
How does IEEE 754 single-precision 32-bit float conversion work in this tool?
The tool converts 4 hexadecimal bytes (32 bits) into sign (1 bit), biased exponent (8 bits, bias 127), and normalized fraction/mantissa (23 bits). The value is computed as: (-1)^sign * 2^(exponent - 127) * (1 + sum(b_i * 2^(-i))). It accurately parses normalized numbers, denormals, infinity, and NaN.
What is the maximum integer size supported by this decoder?
This tool decodes unsigned and signed two-complement integers up to 64 bits (uint64 max: 18,446,744,073,709,551,615; int64 min/max: -9,223,372,036,854,775,808 to +9,223,372,036,854,775,807) using native JavaScript BigInt precision to prevent floating-point truncation.
How do you decode signed negative values from hexadecimal registers?
Negative integers are represented in two-complement binary. In a 16-bit signed integer (int16), if the most significant bit (MSB) is 1 (hex values 0x8000 to 0xFFFF), the value is negative. The decimal is computed by subtracting 65,536 (2^16) from the unsigned value. For example, 0xFFFF = 65535 - 65536 = -1.
What is the difference between Big-Endian and Little-Endian?
Big-Endian (MSB first) stores the most significant byte at the lowest memory address. Little-Endian (LSB first) stores the least significant byte at the lowest memory address. For the 32-bit hex value 0x12345678, Big-Endian order is [12, 34, 56, 78] whereas Little-Endian order is [78, 56, 34, 12].
How do PLCs map RFID EPC memory into Holding Registers (40001+)?
A standard 96-bit (12-byte) EPC occupies exactly six 16-bit Modbus Holding Registers (e.g., 40001 to 40006). Industrial middleware packages each 2-byte chunk into consecutive registers. Word and byte swap settings must match between the RFID edge controller and the PLC Modbus master.
Can this converter parse raw ASCII character strings from RFID user memory?
Yes. The converter translates hex pairs into ASCII character representations (e.g., 0x41424344 decodes to ASCII "ABCD"), allowing instant validation of custom asset tags, serial barcodes, and batch date codes stored in RFID User Memory Bank 11.
Hi, Can I Help ? 💬
AI