🧮

IEEE 754 Floating Point Visualizer

Alle Bits einzeln schalten, Komponenten (Vorzeichen, Exponent, Mantisse) live beobachten und die IEEE 754-Darstellung verstehen.

Example values

Bit-Raster

Click = bit toggle · MSB left
Vorzeichen (1 Bit) Exponent (8 Bits, Bias=127) Mantisse / Fraction (23 Bits)
31302928272625242322212019181716
SEEEEEEEEMMMMMMM
1514131211109876543210
MMMMMMMMMMMMMMMM
Dezimalwert
0
Hexadezimal
0x00000000
Binary
0|00000000|00000000000000000000000

Component breakdown

0
Vorzeichen-Bit · Bit 31
+ positiv
(-1)^0 = +1

Bestimmt ausschließlich das Vorzeichen. 0 = positiv, 1 = negativ. Daher existieren +0 und -0.

00000000
8 Bits · Bits 30..23
Rohwert: 0
Bias: 127
Alle Bits = 0 → ±0 (Null)

Der Exponent wird mit einem Bias gespeichert damit keine Vorzeichenbits nötig sind. Echter Exponent = Rohwert − 127 (Bereich -126 bis 127).

0000 0000 0000 0000 0000 000
23 Bits · Bits 22..0
Fraktionswert: 0.0000000
1.M = 1.0000000(implicit leading 1)

Jedes Bit i trägt 2^-(i+1) bei (0,5 · 0,25 · 0,125 …). Bei normalisierten Zahlen wird eine führende 1 implizit addiert → spart 1 Bit Präzision.

Gesamtformel
(-1)0  ×  2-127  ×  1.0000000
= 1.00000 × 2-127
= 0

IEEE 754 – Wie es funktioniert

🔴 Vorzeichen (Sign)

1 Bit — Bit 31

0 = positiv, 1 = negativ.

Ändert nur das Vorzeichen, nicht den Betrag. Deshalb gibt es +0and-0 — mathematisch gleich, aber unterschiedliche Bits.

🟡 Exponent (Biased)

8 Bits— saved with bias127.

Echter Exponent = gespeicherter Wert − 127
Bereich: -126 bis +127

Sonderregel: Alle 0 → Null/Denorm, alle 1 → Inf/NaN.

🟢 Mantisse (Fraction)

23 Bits — der gebrochene Anteil.

Bei normalisierten Zahlen wird eine führende 1implicitly added:
Wert = 1.M (binary)

Jedes Bit i steht für 2-(i+1) (1/2, 1/4, 1/8 …)

Sonderwerte
SExponentMantisseBedeutung
0alle 0alle 0+0
1alle 0alle 0−0
0alle 1alle 0+∞
1alle 1alle 0−∞
alle 1≠ 0NaN
alle 0≠ 0denormalized
Wertebereich float32
Max (norm):≈ 3.4028 × 10³⁸
Min (norm):≈ 1.1755 × 10⁻³⁸
Min (denorm):≈ 1.4 × 10⁻⁴⁵
Epsilon:≈ 1.19 × 10⁻⁷
~7 signifikante Dezimalstellen
⚠️ Warum gilt 0.1 + 0.2 ≠ 0.3?

Dezimalbrüche wie 0.1 oder 0.2 lassen sich binär not exact darstellen — ähnlich wie 1/3 im Dezimalsystem unendlich viele Stellen hat. Die Mantisse hat nur 23 Bits, daher muss gerundet werden. Probiere: Preset 0.1 anklicken — der gezeigte Dezimalwert weicht leicht von 0.1 ab (f32 mehr als f64).

💡 Denormalized numbers

Wenn der Exponent alle 0contains and the mantissa ≠ 0 is, the numberdenormalized. Dabei entfällt die implizite führende 1 → Wert = 0.M × 2-126. Das ermöglicht sehr kleine Zahlen nahe 0 unter Verlust der vollen Präzision (gradual underflow). Preset Denorm zeigt ein Beispiel.

Understanding Floating Point Representation

The IEEE-754 Float Visualizer provides a detailed breakdown of how computers represent decimal numbers in binary format. By inputting either a decimal or hexadecimal value, the tool automatically decomposes the number into its constituent parts: the sign bit, the exponent (including bias), and the mantissa. It supports both 32-bit (Float32) and 64-bit (Float64) formats, allowing you to see exactly how bits are allocated and how implicit values are handled in different floating-point standards.

Practical Use Cases for Developers

This tool is essential for software engineers, computer science students, and hardware developers who need to debug precision issues or understand the intricacies of floating-point arithmetic. It helps visualize why certain numbers cannot be represented exactly, how machine epsilon affects calculations, and what happens when values become denormalized. Whether you are studying the IEEE 754 standard or debugging a specific numerical bug in your code, this visualizer provides immediate clarity on bit-level representations.

Privacy and Local Processing

Your data privacy is guaranteed because all calculations are performed locally within your web browser. No input values, whether they are decimal numbers or hex strings, are ever transmitted to a server or stored externally. This ensures that your analysis remains private and secure while providing an instant, interactive experience for exploring floating-point bit distributions across different sizes and formats.

Frequently asked questions

What is the difference between Float32 and Float64?

Float32 uses 32 bits to represent a number, while Float64 uses 64 bits. Because Float64 has more bits allocated to the exponent and mantissa, it offers much higher precision and a significantly larger range of values compared to the standard Float32 format used in many applications.

What are denormalized numbers?

Denormalized numbers (or subnormal numbers) are values very close to zero that do not have an implicit leading one in their mantissa representation. They allow for a gradual loss of precision as numbers approach the smallest possible representable values, and this tool helps you visualize these specific bit patterns.

What is machine epsilon?

Machine epsilon is the smallest positive difference between 1.0 and the next representable floating-point number in a given format. It defines the precision limit of the system. The visualizer provides reference values for both Float32 (approx. 1.19e-7) and Float64 (approx. 2.22e-16).

Can I convert hex values to bit representations?

Yes, the tool supports converting hexadecimal strings directly into their IEEE 754 bit breakdowns. This is highly useful for developers who need to verify how raw memory data or specific hex codes are interpreted as floating-point numbers in different programming environments and hardware architectures.