The IBM Floating Point Architecture reference article from the English Wikipedia on 24-Jul-2004
(provided by Fixed Reference: snapshots of Wikipedia from wikipedia.org)

IBM Floating Point Architecture

Why not sponsor a child for Christmas in 2008?
IBM System/360 computers, and subsequent machines based on that architecture (mainframes), support a hexadecimal floating-point format. The format is used by SAS Transport files as required by the FDA for New Drug Application (NDA) study submissions. See TS-140 [1].

Hexadecimal floating-point uses a similar approach to IEEE 754 binary floating-point, but with many differences. The significand is longer, and the exponent is shorter:

 1     7                               56 bits
+-+-----------+----------------------------------------------------+
|S|  Exp      |  Fraction                                          |
+-+-----------+----------------------------------------------------+
63 62       56 55                                                 0

The bias is 64 because the exponent is smaller. Even though the base is 16, the exponent in this form is slightly smaller than the equivalent in IEEE 754.

Note that in this format the initial bit is not suppressed, and the radix point is set to the left of the mantissa.

See, for example: Schwarz, CMOS floating-point unit for the S/390 Parallel Enterprise Server G4

Since 1998, IBM mainframes have also included binary floating-point units which conform to IEEE 754. When decimal floating-point is added later this decade (200x), each will have at least three floating-point units.


The factual accuracy of this article, below this point, is disputed: see  

Converting to and from IEEE format

To convert from IEEE to IBM:

  1. You may want to check for special cases - for instance SAS uses 0x2e for missing numbers.
  2. Mask out the sign, mantissa, and exponent.
  3. Make the exponent an integer - by shifting 56 bits to the right for instance.
  4. Subtract the bias (1023 for IEEE).
  5. Reinsert the suppressed first bit for IBM.
  6. Move the mantissa 1 bit left for each IEEE exponent mod 3. This is adding to the mantissa to allow for the change in base.
  7. Put the mantissa back so that its first bit is at the end of the exponent.
  8. Change the IEEE exponent to an IBM exponent by dividing by 4.
  9. Add the IBM bias (64) to the exponent.
  10. Move the IBM exponent back up to the left - to the bits 2-7.
  11. Mask and OR the exponent, sign, and mantissa back together.

Converting from IBM to IEEE is very similar in concept. Again the tricky part is moving the mantissa since IBM always puts the radix just left of the mantissa. The exponent must be adjusted at the same time. This is essentially the reverse of steps 6 and 7 above.