Bits of a Floating Point Value

The IEEE 754 representation of a floating point value:

Single Precision
Single Precision bit representation 31 1 bit sign 60 23 8 bits exponent 22 0 23 bits significand
Double Precision
Double Precision bit representation 63 1 bit sign 62 52 11 bits exponent 51 0 52 bits significand

The value represented is:

± 1.significand × 2exponent

Example: Decoding a single precision float:

0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1. 1 1 0 0 0 0 0 1 0 1 means negative convert to base 10 add implicit 1. 130 adjust offset, −127 3 × 2 3 = −1010.01 convert to base 10 −10.25

Special Cases

Comments

Be the first to comment!