Microsoft Binary Format

In computing, Microsoft Binary Format (MBF) was a format for floating point numbers used in Microsoft's BASIC language products including MBASIC, QuickBasic and GW-BASIC.[1]

MBF numbers consist of a sign bit, an eight bit exponent with bias 128, and a 23 or 55 bit significand. The decimal point is located before the assumed bit. The MBF double precision format provided slightly more precison than the IEEE 754 format, but less scale.[2][3]

MBF single-precision format (32 bits):

Exponent Sign Significand
8 bits,
bit 31-24
1 bit,
bit 23
23 bits,
bit 22-0
xxxxxxxx s mmmmmmmmmmmmmmmmmmmmmmm

MBF double-precision format (64 bits):

Exponent Sign Significand
8 bits,
bit 63-56
1 bit,
bit 55
55 bits,
bit 54-0
xxxxxxxx s mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

By the time Visual Basic was released, the IEEE 754 standard had become widely adopted - for example, it was incorporated into Intel's 387 coprocessor and every x86 processor from the 486 on. Visual Basic uses the IEEE 754 format instead of MBF.

See also

Further reading

Notes and references

  1. "IEEE vs. Microsoft Binary Format; Rounding Issues (Complete)". Microsoft Support. November 21, 2006. Retrieved February 24, 2010.
  2. "IEEE vs. Microsoft Binary Format; Rounding Issues (Complete)". Microsoft Support. November 21, 2006. Retrieved February 24, 2010.
  3. "Need to access MBF (Microsoft Binary Format) data". Experts Exchange. December 11, 2001. Retrieved February 24, 2010.(subscription required)