Floating Point Format

Imagine you have a processor with registers of size 32 bits. Can the processor store a number larger than 32 bits in one register? It is possible if the number is represented in floating point format.

The floating point format is useful in representing very large and very small integer numbers without increasing the number of bits. This format is also used in computers to represent numbers having both integer and fractional components. The floating point format has two parts, such as mantissa and exponent. The mantissa of a number represents the magnitude, and the value is between 0 and 1. The exponent of the number represents how many places the decimal/binary points will move.

We can take an example of a decimal integer number to get a sense of it.

Example:

Integer number = 566734232

Equivalent Floating point number = 0.566734232 x 109

Here, the mantissa is 0.566734232, which is a fractional number, and the value is between 0 and 1. This is achieved by moving the decimal point to the left of the MSB of the integer. Thus, the mantissa value is 9 (as the decimal point has moved 9 places).

For binary-floating point numbers, ANSI/IEEE Standard 754 is the most popular representation format used in computers, including Intel-based processors. A floating point number represented in IEEE 754 has three parts such as sign, mantissa, and exponent. There are, again, three different forms of representation in IEEE 754, as tabulated below. All these three forms are similar in representation but different in size.

Single-precision 32 bits
Double-precision 64 bits
Extended-precision 80 bits

The follow-up articles are listed below:

  1. Single-Precision IEEE 754 Representation for Floating Point Numbers
  2. Binary Value from a Single-Precision Floating Point Representation
  3. Decimal Number to a Binary Single-Precision Floating Point Number

Previous           Table of Content           Next

Leave a Reply

Your email address will not be published. Required fields are marked *