IEEE 754 Representation
IEEE 754: The standard for floating-point arithmetic. A float consists of sign bit, exponent, and mantissa (fraction). Understanding this format is essential for debugging FP code.
x86 Assembly Mastery
Your 25-step learning path • Currently on Step 12
Development Environment, Tooling & Workflow
Assembly Language Fundamentals & Toolchain Setup
x86 CPU Architecture Overview
Registers – Complete Deep Dive
Instruction Encoding & Binary Layout
NASM Syntax, Directives & Macros
Complete Assembler Comparison
Memory Addressing Modes
Stack Internals & Calling Conventions
Control Flow & Procedures
Integer, Bitwise & Arithmetic Operations
12
Floating Point & SIMD Foundations
13
SIMD, Vectorization & Performance
14
System Calls, Interrupts & Privilege Transitions
15
Debugging & Reverse Engineering
16
Linking, Relocation & Loader Behavior
17
x86-64 Long Mode & Advanced Features
18
Assembly + C/C++ Interoperability
19
Memory Protection & Security Concepts
20
Bootloaders & Bare-Metal Programming
21
Kernel-Level Assembly
22
Complete Emulator & Simulator Guide
23
Advanced Optimization & CPU Internals
24
Real-World Assembly Projects
25
Assembly Mastery Capstone
Single Precision (32-bit float)
IEEE 754 Single Precision
| Sign (1 bit) | Exponent (8 bits) | Mantissa (23 bits) |
| 31 | 30-23 | 22-0 |
Value = (-1)^S × 1.M × 2^(E-127)
Examples:
1.0 = 0x3F800000 = 0 01111111 00000000000000000000000
-2.0 = 0xC0000000 = 1 10000000 00000000000000000000000
3.14 ≈ 0x4048F5C3
Double Precision (64-bit double)
IEEE 754 Double Precision
| Sign (1 bit) | Exponent (11 bits) | Mantissa (52 bits) |
| 63 | 62-52 | 51-0 |
Value = (-1)^S × 1.M × 2^(E-1023)
Examples:
1.0 = 0x3FF0000000000000
-2.0 = 0xC000000000000000
3.14159265358979 ≈ 0x400921FB54442D18
Special Values:
+∞ = 0x7FF0000000000000 (exponent all 1s, mantissa 0)
-∞ = 0xFFF0000000000000
NaN = 0x7FF8000000000000 (exponent all 1s, mantissa non-zero)
Precision Comparison
| Type | Bits | Significant Digits | Range |
|---|---|---|---|
| Float (single) | 32 | ~7 | ±1.18×10⁻³⁸ to ±3.4×10³⁸ |
| Double | 64 | ~15-16 | ±2.23×10⁻³⁰⁸ to ±1.8×10³⁰⁸ |
| x87 Extended | 80 | ~19 | ±3.65×10⁻⁴⁹³² to ±1.18×10⁴⁹³² |