Binary Floats

Javascript's relatively new DataView object allows us to easily inspect the binary representation of floating point numbers without worrying about platform endianness.

Floating point numbers are implemented according to IEEE 754. The binary representation contains a sign, exponent and mantissa (the fractional part).
Infinity, -Infinity and NaN (not a number) have specific bit representations.

single (float32)

Float32 input:
or, Hex input:

Float representation:

Binary representation:

double (float64)

Float64 input:
or, Hex input:

Float representation:

Binary representation: