Data Type Converter | IEEE‑754 Float/Hex/Decimal Conversion/Multi-Byte Order (Big/Little/Swap) Support/Real‑time
Professional data type conversion tool for IEEE‑754 floating‑point and integer formats: bidirectional Hex ⇄ Decimal conversion covering UINT16/INT16/UINT32/INT32/FLOAT32/UINT64/INT64/FLOAT64, with multiple byte orders (Big Endian/Little Endian/Big Endian – byte swap/Little Endian – byte swap) and real‑time results.
Conversion Results
| Data Type | ABCD (Big Endian - High Byte First) | DCBA (Little Endian - Low Byte First) | BADC | CDAB |
|---|---|---|---|---|
UINT16 16-bit Unsigned Integer | - | - | ||
INT16 16-bit Signed Integer | - | - | ||
UINT32 32-bit Unsigned Integer | - | - | - | - |
INT32 32-bit Signed Integer | - | - | - | - |
FLOAT32 32-bit Float | - | - | - | - |
UINT64 64-bit Unsigned Integer | - | - | - | - |
INT64 64-bit Signed Integer | - | - | - | - |
FLOAT64 64-bit Float | - | - | - | - |
User Guide
Overview
Designed to convert between Hex and Decimal and across 16‑ to 64‑bit data types. Signed integers use two’s complement; floating‑point values use IEEE‑754 (32‑bit single / 64‑bit double). The UI makes byte‑order effects directly visible.
Key Features:
- Format Conversion: Support bidirectional conversion between hexadecimal and decimal
- Multiple Data Types: Support 8 common data types (UINT16/INT16/UINT32/INT32/FLOAT32/UINT64/INT64/FLOAT64)
- Byte Order Support: Support 4 byte orders (ABCD/DCBA/BADC/CDAB) to adapt to different device requirements
- Real-time Conversion: Immediately display conversion results for all types after data input
How to Use
- 1. Select input format: decimal or hexadecimal
- 2. Enter the value in the input box
- 3. View conversion results in the table below
- 4. Out-of-range conversion results will be displayed as '-'
Input Format Description
- Decimal input: Enter numbers directly, e.g.: 123, -456, 3.14
- Hexadecimal input: Enter hex characters, e.g.: 7B, FF00, A1B2C3D4
- Hexadecimal auto-formatting: Automatically pad to even digits and add space separators during input
Data Type Description
Integer Types:UINT16/INT16 are 2 bytes, UINT32/INT32 are 4 bytes, UINT64/INT64 are 8 bytes; signed integers use two’s complement (MSB is sign; negatives are bitwise NOT + 1) and are sign‑extended to the target width when parsing.
Float Types:FLOAT32 is IEEE‑754 single precision (1 sign + 8 exponent + 23 mantissa, bias 127); FLOAT64 is double precision (1 sign + 11 exponent + 52 mantissa, bias 1023). Supports ±0, ±Infinity, NaN; subnormal numbers use denormalized exponent.
Range Limitation: Values exceeding the data type range will be displayed as '-'
Byte Order Description
- ABCD: Big‑endian, high byte first
- DCBA: Little‑endian, low byte first
- BADC: 16‑bit word swap (AB↔BA, CD↔DC)
- CDAB: 32‑bit group swap (e.g., CDAB/GHEF word order)
Note: Byte endianness and 16‑bit word order differ; for 16‑bit only ABCD/DCBA matter. For 64‑bit prefer A–H eight‑byte diagrams.
Data Conversion Knowledge
What is data type conversion?
Converting the same numeric value between bases (Decimal/Hex) and between data types (integers/floats). Common in Modbus/PLC/embedded register parsing and framing.
IEEE‑754 floating‑point (single/double)
Single (32‑bit): 1 sign + 8 exponent (bias 127) + 23 mantissa. Double (64‑bit): 1 sign + 11 exponent (bias 1023) + 52 mantissa. Supports ±0, ±Infinity, NaN; subnormals represent very small magnitudes.
Two’s complement & signed integers
Negatives are obtained by bitwise NOT + 1. When parsing Hex to INT types, sign‑extend to the target bit‑width; MSB indicates the sign.
Byte endianness vs register word order
Endianness controls byte layout (ABCD/DCBA); word order controls 16‑bit register order (BADC/CDAB). Both affect 32/64‑bit data. Follow device documentation.
64‑bit integers & JavaScript safe integers
JS Number is IEEE‑754 double; safe integers are ±(2^53‑1). This tool uses BigInt for 64‑bit conversions; out‑of‑range or risky values render as ‘-’.
Hex input normalization
Remove non‑Hex chars, uppercase, pad leading 0 to even length, and group every two digits with spaces for readability.
Decimals vs integer targets
If decimal input contains a dot and target is an integer type, show ‘-’. Only FLOAT32/FLOAT64 accept fractional input.
Common pitfalls
Endianness ≠ bit order; NaN has many encodings but displays as NaN; ±0 differ but compare equally in most cases.
Application Scenarios
- Modbus communication data format conversion
- PLC data type debugging
- Industrial equipment parameter configuration
- Communication protocol analysis
- Data acquisition system development
- Device register value calculation
- Float to integer conversion
- Multi-device data format adaptation
- Instrumentation/transmitter reading parsing
- Historical data replay & alignment (endianness/word‑order correction)