Floating Point


Encoding non-integer values requires the use of Scientific or Floating-point notation. Many floating-point systems exist but one of the more common is the IEEE 754 standard.

A value encoded in floating-point format is composed of two major components: a mantissa and an exponent. The actual structure of these is examined for the IEEE 754 standard.

Floating-point values may be handled completely through software, by means of an extra "math co-processor", or by complex instructions built into the main processor.


Fractional Values

Fractions can be handled in 3 different ways:

IEEE 754 Standard

      1-bit sign | 8-bit exponent | 23-bit mantissa
      (sign bit = 1 for negative values)

      For example:
         43 4D 40 00 (hex)
      re-written in binary:
         0100 0011  0100 1101  0100 0000 0000 0000
      re-grouped:
         sign:   exponent(+127):   mantissa:
           0       10000110         (1.)100110101000...
       (positive)    134(dec)
                  exponent: 
                     134-127 = 7
        moving the decimal point 7 positions to the right:
             1   1  0  0  1  1  0  1 .  0   1
            128 64 32 16  8  4  2  1   1/2 1/4 (weights)
        = +205.25

Other Floating Point Forms

Main mainframe computers were designed prior to the establishment of the IEEE 754 standard and employ their own format for floating point encoding.

Implementation Methods

How floating point arithmetic is actually performed varies among different computer systems.