User Tools

Site Tools


tanszek:oktatas:techcomm:floating-point_representation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tanszek:oktatas:techcomm:floating-point_representation [2024/10/06 17:33] – [Single-Precision (32-bit) Example] kneheztanszek:oktatas:techcomm:floating-point_representation [2025/10/14 16:43] (current) – [Special Values in Floating-Point Representation] knehez
Line 13: Line 13:
 The formula: The formula:
  
-$$ \text{Value} = (-1)^S \times 1.M \times 2^{(E - \text{Bias})} $$+$$ \text{value} = (-1)^S \times 1.M \times 2^{(E - \text{Bias})} $$
  
 where **Bias** is 127 for single-precision (32-bit). where **Bias** is 127 for single-precision (32-bit).
Line 53: Line 53:
 | -Infinity| 1 | 11111111 | 00000000000000000000000 | Represents negative infinity |  | -Infinity| 1 | 11111111 | 00000000000000000000000 | Represents negative infinity | 
 | NaN | 0 or 1 | 11111111 | Non-zero value | Represents "Not a Number", used for undefined operations | | NaN | 0 or 1 | 11111111 | Non-zero value | Represents "Not a Number", used for undefined operations |
 +
 +Try them out here: https://evanw.github.io/float-toy/
tanszek/oktatas/techcomm/floating-point_representation.1728236031.txt.gz · Last modified: 2024/10/06 17:33 by knehez