wisconsin
Fixed and Floating Points

Fixed and Floating Points

Curated by Last modified: 1 min read

Accuracy describes closeness to the intended mathematical value. Precision describes the resolution or number of significant bits available to distinguish representable values.

Fixed point

A fixed-point format interprets an integer bit pattern using a fixed scale, such as for fractional places. The binary point is a convention, not an extra stored bit. Signed fixed point can use two’s-complement integers with that same scale.

Floating point

Binary32 has one sign bit, eight exponent bits, and 23 fraction bits. For normalized finite values,

The leading 1 is implicit for normalized numbers. It is not always 1: the zero/subnormal exponent case has different interpretation. The all-ones exponent is reserved for infinities and NaNs.

Finite precision means arithmetic may round, and decimal fractions such as 0.1 need not be exactly representable.

Related: lecture-04.

Source

Original retained in wisconsin-legacy.

Linked to this page