Convert between hexadecimal, decimal, binary, octal, text, and floating-point numbers. Supports IEEE 754 formats.
Hexadecimal (base-16) is a numeral system that uses 16 distinct symbols: 0-9 to represent values 0-9, and A-F to represent values 10-15. It's widely used in computing as a human-friendly representation of binary data.
| Hex | Decimal | Binary | Hex | Decimal | Binary |
|---|---|---|---|---|---|
| 0 | 0 | 0000 | 8 | 8 | 1000 |
| 1 | 1 | 0001 | 9 | 9 | 1001 |
| 2 | 2 | 0010 | A | 10 | 1010 |
| 3 | 3 | 0011 | B | 11 | 1011 |
| 4 | 4 | 0100 | C | 12 | 1100 |
| 5 | 5 | 0101 | D | 13 | 1101 |
| 6 | 6 | 0110 | E | 14 | 1110 |
| 7 | 7 | 0111 | F | 15 | 1111 |
Note: Hexadecimal is particularly useful in computing because it can represent every byte (8 bits) as two consecutive hexadecimal digits, making it much easier for humans to read and understand binary data.
IEEE 754 is the technical standard for floating-point computation established in 1985. It defines formats for representing floating-point numbers and special values like infinity and NaN (Not a Number).
| Format | Bits | Sign Bits | Exponent Bits | Mantissa Bits | Exponent Bias | Range | Precision |
|---|---|---|---|---|---|---|---|
| Single Precision | 32 | 1 | 8 | 23 | 127 | ±1.18×10-38 to ±3.4×1038 | ~7 decimal digits |
| Double Precision | 64 | 1 | 11 | 52 | 1023 | ±2.23×10-308 to ±1.80×10308 | ~15 decimal digits |
Note: The value of a floating-point number is determined by: (-1)sign × 2(exponent - bias) × 1.mantissa
| Value | Single Precision (Hex) | Double Precision (Hex) | Description |
|---|---|---|---|
| Positive Zero | 00000000 | 0000000000000000 | +0.0 |
| Negative Zero | 80000000 | 8000000000000000 | -0.0 |
| Positive Infinity | 7F800000 | 7FF0000000000000 | +∞ |
| Negative Infinity | FF800000 | FFF0000000000000 | -∞ |
| NaN (Quiet) | 7FC00000 | 7FF8000000000000 | Not a Number (quiet) |
| NaN (Signaling) | 7F800001 | 7FF0000000000001 | Not a Number (signaling) |
Hexadecimal (base-16) is a numerical system that uses 16 symbols: 0-9 to represent values 0-9, and A-F to represent values 10-15. It's widely used in computing because:
Technical Example: The hexadecimal value "1A3F" can be converted to:
Technical Note: Floating-point numbers have limited precision and can represent only a finite set of real numbers. Rounding errors are common in floating-point arithmetic.
Floating-point conversion involves translating between the hexadecimal representation of a floating-point number and its decimal value according to the IEEE 754 standard. This is essential for low-level programming, data analysis, and scientific computing.
Select the "Float ↔ Hex" tab for floating-point conversion.
Choose between single precision (32-bit) or double precision (64-bit).
Enter a floating-point number to convert to hexadecimal, or enter hexadecimal to convert to a floating-point number.
Click the appropriate convert button or let the real-time conversion do the work.
View the detailed IEEE 754 representation in the results section.
The IEEE 754 standard defines how floating-point numbers are represented in binary. Each number consists of three parts:
Technical Example: The number -118.625 in single-precision format:
Floating-point numbers have limited precision and can lead to unexpected results:
| Calculation | Expected | Actual (Float) |
|---|---|---|
| 0.1 + 0.2 | 0.3 | 0.30000000000000004 |
| 1.0 - 0.9 | 0.1 | 0.09999999999999998 |
| 0.1 * 0.1 | 0.01 | 0.010000000000000002 |
These precision issues occur because many decimal fractions cannot be represented exactly in binary floating-point format.