64-bit MBF
   HOME

TheInfoList



OR:

In computing, Microsoft Binary Format (MBF) is a format for
floating-point In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can b ...
numbers which was used in Microsoft's
BASIC BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
language products, including MBASIC, GW-BASIC and QuickBASIC prior to version 4.00. There are two main versions of the format. The original version was designed for memory-constrained systems and stored numbers in 32 bits (4 bytes), with a 23-bit mantissa, 1-bit sign, and an 8-bit
exponent Exponentiation is a mathematical operation, written as , involving two numbers, the '' base'' and the ''exponent'' or ''power'' , and pronounced as " (raised) to the (power of) ". When is a positive integer, exponentiation corresponds to re ...
. Extended (12k) BASIC included a double-precision type with 64 bits. During the period when it was being ported from the Intel 8080 platform to the MOS 6502 processor, computers were beginning to ship with more memory as a standard feature. This version was offered with the original 32-bit format or an optional expanded 40-bit (5-byte) format. The 40-bit format was used by most home computers of the 1970s and 1980s. These two versions are sometimes known as "6-digit" and "9-digit", respectively. On PCs with x86 processor, QuickBASIC, prior to version 4, reintroduced the double-precision format using a 55-bit mantissa in a 64-bit (8-byte) format. MBF was abandoned during the move to QuickBASIC 4, which used the standard
IEEE 754 The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point arithmetic established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found i ...
format, introduced a few years earlier.


History

Bill Gates and Paul Allen were working on Altair BASIC in 1975. They were developing the software at Harvard University on a DEC PDP-10 running their Altair emulator. One thing they lacked was code to handle floating-point numbers, required to support calculations with very big and very small numbers, which would be particularly useful for science and engineering. One of the proposed uses of the Altair was as a scientific calculator. At a dinner at Currier House, an undergraduate residential house at Harvard, Gates and Allen complained to their dinner companions that they had to write this code and one of them, Monte Davidoff, told them that he had written floating-point routines before and convinced Gates and Allen that he was capable of writing the Altair BASIC floating-point code. At the time, while IBM had introduced their own programs, there was no standard for floating-point numbers, so Davidoff had to come up with his own. He decided that 32 bits would allow enough range and precision. When Allen had to demonstrate it to MITS, it was the first time it ran on an actual Altair. But it worked, and when he entered ‘PRINT 2+2’, Davidoff's adding routine gave the correct answer. The source code for Altair BASIC was thought to have been lost to history, but resurfaced in 2000. It had been sitting behind Gates's former tutor and dean Harry Lewis's file cabinet, who rediscovered it. A comment in the source credits Davidoff as the writer of Altair BASIC's math package. Altair BASIC took off, and soon most early home computers ran some form of Microsoft BASIC. The BASIC port for the 6502 CPU, such as used in the Commodore PET, took up more space due to the lower code density of the 6502. Because of this it would likely not fit in a single ROM chip together with the machine-specific input and output code. Since an extra chip was necessary, extra space was available, and this was used in part to extend the floating-point format from 32 to 40 bits. This extended format was not only provided by Commodore BASIC 1 & 2, but was also supported by Applesoft BASIC I & II since version 1.1 (1977), KIM-1 BASIC since version 1.1a (1977), and MicroTAN BASIC since version 2b (1980). Not long afterwards, the Z80 ports, such as
Level II BASIC Microsoft BASIC is the foundation software product of the Microsoft company and evolved into a line of BASIC interpreters and compiler(s) adapted for many different microcomputers. It first appeared in 1975 as Altair BASIC, which was the fir ...
for the TRS-80 (1978), introduced the 64-bit, double-precision format as a separate data type from 32-bit, single-precision. Microsoft used the same floating-point formats in their implementation of Fortran and for their macro assembler
MASM The Microsoft Macro Assembler (MASM) is an x86 assembler that uses the Intel syntax for MS-DOS and Microsoft Windows. Beginning with MASM 8.0, there are two versions of the assembler: One for 16-bit & 32-bit assembly sources, and another (ML64) ...
, although their spreadsheet Multiplan and their
COBOL COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural and, since 2002, object-oriented language. COBOL is primarily us ...
implementation used
binary-coded decimal In computing and electronic systems, binary-coded decimal (BCD) is a class of binary encodings of decimal numbers where each digit is represented by a fixed number of bits, usually four or eight. Sometimes, special bit patterns are used for ...
(BCD) floating point. Even so, for a while MBF became the de facto floating-point format on home computers, to the point where people still occasionally encounter legacy files and file formats using it. In a parallel development, Intel had started the development of a floating-point
coprocessor A coprocessor is a computer processor used to supplement the functions of the primary processor (the CPU). Operations performed by the coprocessor may be floating-point arithmetic, graphics, signal processing, string processing, cryptography o ...
in 1976.
William Morton Kahan William "Velvel" Morton Kahan (born June 5, 1933) is a Canadian mathematician and computer scientist, who received the Turing Award in 1989 for "''his fundamental contributions to numerical analysis''", was named an ACM Fellow in 1994, and inducte ...
, as a consultant to Intel, suggested that Intel use the floating point of Digital Equipment Corporation's (DEC) VAX. The first VAX, the VAX-11/780 had just come out in late 1977, and its floating point was highly regarded. VAX's floating-point formats differed from MBF only in that it had the sign in the most significant bit. However, seeking to market their chip to the broadest possible market, Kahan was asked to draw up specifications. When rumours of Intel's new chip reached its competitors, they started a standardization effort, called
IEEE 754 The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point arithmetic established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found i ...
, to prevent Intel from gaining too much ground. As an 8-bit exponent was not wide enough for some operations desired for double-precision numbers, e.g. to store the product of two 32-bit numbers, Intel's proposal and a counter-proposal from DEC used 11 bits, like the time-tested 60-bit floating-point format of the CDC 6600 from 1965. Kahan's proposal also provided for infinities, which are useful when dealing with division-by-zero conditions; not-a-number values, which are useful when dealing with invalid operations; denormal numbers, which help mitigate problems caused by underflow; and a better balanced exponent bias, which could help avoid overflow and underflow when taking the reciprocal of a number. By the time
QuickBASIC 4.00 Microsoft QuickBASIC (also QB) is an Integrated Development Environment (or IDE) and compiler for the BASIC programming language that was developed by Microsoft. QuickBASIC runs mainly on DOS, though there was also a short-lived version for the ...
was released, the IEEE 754 standard had become widely adopted—for example, it was incorporated into Intel's
387 __NOTOC__ Year 387 ( CCCLXXXVII) was a common year starting on Friday (link will display the full calendar) of the Julian calendar. At the time, it was known as the Year of the Consulship of Augustus and Eutropius (or, less frequently, year 11 ...
coprocessor and every x86 processor from the
486 __NOTOC__ Year 486 ( CDLXXXVI) was a common year starting on Wednesday (link will display the full calendar) of the Julian calendar. At the time, it was known as the Year of the Consulship of Basilius and Longinus (or, less frequently, year 12 ...
on. QuickBASIC versions 4.0 and 4.5 use IEEE 754 floating-point variables by default, but (at least in version 4.5) there is a command-line option for the IDE and the compiler that switches from IEEE to MBF floating-point numbers, to support earlier-written programs that rely on details of the MBF data formats. Visual Basic also uses the IEEE 754 format instead of MBF.


Technical details

MBF numbers consist of an 8-bit base-2
exponent Exponentiation is a mathematical operation, written as , involving two numbers, the '' base'' and the ''exponent'' or ''power'' , and pronounced as " (raised) to the (power of) ". When is a positive integer, exponentiation corresponds to re ...
, a sign bit (positive mantissa: ''s'' = 0; negative mantissa: ''s'' = 1) and a 23-, 31- or 55-bit mantissa of the
significand The significand (also mantissa or coefficient, sometimes also argument, or ambiguously fraction or characteristic) is part of a number in scientific notation or in floating-point representation, consisting of its significant digits. Depending on ...
. There is always a 1-bit implied to the left of the explicit mantissa, and the radix point is located before this
assumed bit In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can be r ...
. The exponent is encoded with a bias of , so that exponents are represented by ''x'' = , exponents are represented by ''x'' = , with a special case for ''x'' = 0 (00h) representing the whole number being zero. The MBF double-precision format provides less scale than the
IEEE 754 The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point arithmetic established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found i ...
format, and although the format itself provides almost one extra decimal digit of precision, in practice the stored values are less accurate because IEEE calculations use 80-bit intermediate results, and MBF doesn't. Unlike IEEE floating point, MBF doesn't support denormal numbers, infinities or NaNs. MBF single-precision format (32 bits, "6-digit BASIC"): MBF extended-precision format (40 bits, "9-digit BASIC"): MBF double-precision format (64 bits):


Examples

* "10": : 32-bit format: 84h, 20h, 00h, 00h : 40-bit format: 84h, 20h, 00h, 00h, 00h * "2": : 32-bit format: 82h, 00h, 00h, 00h : 40-bit format: 82h, 00h, 00h, 00h, 00h * "1": : 32-bit format: 81h, 00h, 00h, 00h : 40-bit format: 81h, 00h, 00h, 00h, 00h * "0": : 32-bit format: 00h, 00h, 00h, 00h (or 00h, xxh, xxh, xxh) : 40-bit format: 00h, 00h, 00h, 00h, 00h (or 00h, xxh, xxh, xxh, xxh) * "0.5": : 32-bit format: 80h, 00h, 00h, 00h : 40-bit format: 80h, 00h, 00h, 00h, 00h * "0.25": : 32-bit format: 7Fh, 00h, 00h, 00h : 40-bit format: 7Fh, 00h, 00h, 00h, 00h * "-0.5": : 32-bit format: 80h, 80h, 00h, 00h : 40-bit format: 80h, 80h, 00h, 00h, 00h * "sqrt(0.5)": : 32-bit format: 80h, 35h, 04h, F3h : 40-bit format: 80h, 35h, 04h, F3h, 34h * "sqrt(2)": : 32-bit format: 81h, 35h, 04h, F3h : 40-bit format: 81h, 35h, 04h, F3h, 34h * "ln(2)": : 32-bit format: 80h, 31h, 72h, 18h : 40-bit format: 80h, 31h, 72h, 17h, F8h * "log2(e)": : 32-bit format: 81h, 38h, AAh, 3Bh : 40-bit format: 81h, 38h, AAh, 3Bh, 29h * "pi/2": : 32-bit format: 81h, 49h, 0Fh, DBh : 40-bit format: 81h, 49h, 0Fh, DAh, A2h * "2*pi": : 32-bit format: 83h, 49h, 0Fh, DBh : 40-bit format: 83h, 49h, 0Fh, DAh, A2h


See also

*
Floating-point arithmetic In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can be ...
*
IEEE 754 The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point arithmetic established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found i ...
— Standard for floating-point arithmetic * IBM hexadecimal floating-point


References

{{reflist, refs= {{cite web , title=IEEE vs. Microsoft Binary Format; Rounding Issues (Complete) , publisher= Microsoft , work=Microsoft Support , id=Article ID KB35826, Q35826 , date=2006-11-21 , url=https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/35826#IEEE_vs._Microsoft_Binary_Format.3B_Rounding_Issues_.28Complete.29 , access-date=2010-02-24 , url-status=live , archive-url=https://web.archive.org/web/20200828130651/https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/35826 , archive-date=2020-08-28 {{cite web , title=Convert pre-IEEE-754 C++ floating-point numbers to/from C# , website=stackoverflow.com , date=2010-04-21 , url=https://stackoverflow.com/questions/2686298/convert-pre-ieee-754-c-floating-point-numbers-to-from-c-sharp , access-date=2016-06-02 , url-status=live , archive-url=https://web.archive.org/web/20200828053012/https://stackoverflow.com/questions/2686298/convert-pre-ieee-754-c-floating-point-numbers-to-from-c-sharp , archive-date=2020-08-28 (NB. The second reference could be mistaken to say that QB 4.0 could use MBF internally, but it only uses IEEE. It just has a few conversion functions to convert IEEE floating point numbers to strings containing MBF data, e.g. {{mono, MKDMBF$ in addition to {{mono, MKD$ which just copies the bytes of the IEEE value to a string.) {{cite news , author-first=Walter , author-last=Isaacson , date=2013-09-20 , title=Dawn of a revolution , newspaper= Harvard Gazette , publisher=news.harvard.edu , url=http://news.harvard.edu/gazette/story/2013/09/dawn-of-a-revolution , access-date=2016-05-30 , url-status=live , archive-url=https://web.archive.org/web/20200828131007/https://news.harvard.edu/gazette/story/2013/09/dawn-of-a-revolution/ , archive-date=2020-08-28 {{cite web , title=Raiders of the Lost Altair BASIC Source Code - They came, they saw … they disassembled , date=2001-05-13 , author-first=Andrew , author-last=Orlowski , magazine= The Register , url=https://www.theregister.co.uk/2001/05/13/raiders_of_the_lost_altair/ , access-date=2016-05-30 , url-status=live , archive-url=https://web.archive.org/web/20200828131543/https://www.theregister.com/2001/05/13/raiders_of_the_lost_altair/ , archive-date=2020-08-28 {{cite web , title=Quest for the Holy Source - Ian's trip to Harvard , author-first=Ian , author-last=Griffiths , date=2000-05-08 , url=http://www.rjh.org.uk/altair/ian.htm , access-date=2016-05-30 , url-status=dead , archive-url=https://web.archive.org/web/20020102173701/http://www.rjh.org.uk/altair/ian.htm , archive-date=2002-01-02 {{cite web , title=Create your own Version of Microsoft BASIC for 6502 , author-first=Michael , author-last=Steil , publisher=pagetable.com , date=2008-10-20 , url=http://www.pagetable.com/?p=46 , access-date=2016-05-30 , url-status=live , archive-url=https://web.archive.org/web/20160530092603/http://www.pagetable.com/?p=46 , archive-date=2016-05-30 {{cite web , title=msbasic/float.s , editor-first=Michael , editor-last=Steil , work=MIST64 , via=github.com , date=2008-10-20 , url=https://github.com/mist64/msbasic/blob/master/float.s , access-date=2020-08-28 , url-status=live , archive-url=https://web.archive.org/web/20200828055855/https://github.com/mist64/msbasic/blob/master/float.s , archive-date=2020-08-28}

(NB. Commented 6502 disassembly listings, merged from several versions of Microsoft BASIC for 6502 between 1977 and 1982 to recreate byte-exact copies of the original ROMs for 10 different machines from different vendors.)
{{cite web , title=msbasic/trig.s , editor-first=Michael , editor-last=Steil , work=MIST64 , via=github.com , date=2008-10-20 , url=https://github.com/mist64/msbasic/blob/master/trig.s , access-date=2020-08-28 , url-status=live , archive-url=https://web.archive.org/web/20200828060134/https://github.com/mist64/msbasic/blob/master/trig.s , archive-date=2020-08-28}

(NB. Commented 6502 disassembly listings, merged from several versions of Microsoft BASIC for 6502 between 1977 and 1982 to recreate byte-exact copies of the original ROMs for 10 different machines from different vendors.)
{{cite web , title=Converting between Microsoft Binary and IEEE formats , date=1998-07-02 , orig-date=1994-03-10 , id=ID 1400 , author=Borland staff , publisher=
Embarcadero USA Embarcadero Technologies, Inc. is an American computer software company that develops, manufactures, licenses, and supports products and services related to software through several product divisions. It was founded in 1993, went public in 2000, ...
/
Inprise Borland Software Corporation was a computer technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad and Philippe Kahn. Its main business was the development and sale of software development and software deployment products ...
(originally:
Borland Borland Software Corporation was a computer technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad and Philippe Kahn. Its main business was the development and sale of software development and software deployment product ...
) , work=Technical Information Database , type=TI1431C.txt , url=https://community.embarcadero.com/index.php/article/technical-articles/162-programming/14799-converting-between-microsoft-binary-and-ieee-forma , access-date=2016-05-30 , url-status=live , archive-url=https://web.archive.org/web/20190220230417/https://community.embarcadero.com/index.php/article/technical-articles/162-programming/14799-converting-between-microsoft-binary-and-ieee-forma , archive-date=2019-02-20 , quote= €¦_fmsbintoieee(float *src4, float *dest4) €¦MS Binary Format €¦byte order => m3 {{! m2 {{! m1 {{! exponent €¦m1 is most significant byte => sbbb{{!bbbb €¦m3 is the
least significant byte In computing, bit numbering is the convention used to identify the bit positions in a binary number. Bit significance and indexing In computing, the least significant bit (LSB) is the bit position in a binary integer representing the binary 1 ...
€¦m = mantissa byte €¦s = sign bit €¦b = bit €¦MBF is bias 128 and IEEE is bias 127. €¦MBF places the decimal point before the
assumed bit In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can be r ...
, while IEEE places the decimal point after the assumed bit. €¦ieee_exp = msbin - 2; /* actually, msbin 1-128+127 */ €¦_dmsbintoieee(double *src8, double *dest8) €¦MS Binary Format €¦byte order => m7 {{! m6 {{! m5 {{! m4 {{! m3 {{! m2 {{! m1 {{! exponent €¦m1 is most significant byte => smmm{{!mmmm €¦m7 is the least significant byte €¦MBF is bias 128 and IEEE is bias 1023. €¦MBF places the decimal point before the assumed bit, while IEEE places the decimal point after the assumed bit. €¦ieee_exp = msbin - 128 - 1 + 1023; €¦}
{{cite web , title=(Complete) Tutorial to Understand IEEE Floating-Point Errors , date=2005-08-16 , publisher= Microsoft , work=Knowledge Base , id=Article ID KB42980, Q42980 , url=https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/42980 , access-date=2016-06-02 , url-status=live , archive-url=https://web.archive.org/web/20200828132831/https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/42980 , archive-date=2020-08-28 {{cite web , title=The MASM 6.1 documentation notes that 5.1 was the last MASM version to support MBF , website=people.sju.edu , url=http://people.sju.edu/~ggrevera/arch/references/MASM61PROGUIDE.pdf , access-date=2016-06-02 GW-BASIC User's Manual, Appendix D.3 USR Function Calls. BASIC Second edition (May 1982), IBM: Appendix C-15 (NB. This is the BASICA manual). {{cite web , url=http://www.trs-80.com/trs80-zaps-internals.htm#rommath , title=ROM Routes (Integer Math) , website=Trs-80.com , access-date=2016-06-02 {{cite journal , title=An introduction to the scientific computing language Pascal-SC , author-last=Rall , author-first=Louis B. , journal= Computers & Mathematics with Applications , publisher=
Pergamon Journals Ltd Pergamon Press was an Oxford-based publishing house, founded by Paul Rosbaud and Robert Maxwell, that published scientific and medical books and journals. Originally called Butterworth-Springer, it is now an imprint of Elsevier. History The cor ...
, volume=14 , number=1 , date=1987 , doi=10.1016/0898-1221(87)90181-7 , location=Mathematics Research Center, University of Wisconsin-Madison, Madison, Wisconsin, pages=53–69 , doi-access=free (17 pages)
{{cite web , title=Floating-Point Numbers in Digital Computers , author-first=K. Ming , author-last=Leung , date=2005-02-03 , orig-date=2000 , location=Department of Computer and Information Science, Polytechnic University , website=cis.poly.edu , url=http://cis.poly.edu/~mleung/CS3734/s05/ch01/floatingPoints2.pdf , access-date=2016-06-02 , url-status=live , archive-url=https://web.archive.org/web/20181214222632/http://cis.poly.edu/~mleung/CS3734/s05/ch01/floatingPoints2.pdf , archive-date=2018-12-14 {{cite book , url=https://books.google.com/books?id=klV_BAAAQBAJ&pg=PA16 , title=Bill Gates: A Biography , date=2014-08-26 , access-date=2016-05-30 , isbn=978-1-44083014-3 , author-last=Becraft , author-first=Michael B. {{cite web , title=The Math Package , website=altairbasic.org , date=2014 , url=http://altairbasic.org/math_ex.htm , access-date=2016-05-30 , url-status=live , archive-url=https://web.archive.org/web/20200828133946/http://altairbasic.org/math_ex.htm , archive-date=2020-08-28 (NB. Altair BASIC 3.2 (4K Edition).) {{cite web , title=Microsoft Altair BASIC legend talks about Linux, CPRM and that very frightening photo - A very rare interview with Monte Davidoff , date=2001-05-11 , author-first=Andrew , author-last=Orlowski , magazine= The Register , url=https://www.theregister.co.uk/2001/05/11/microsoft_altair_basic_legend_talks/ , access-date=2016-05-30 , url-status=live , archive-url=https://web.archive.org/web/20200828133956/https://www.theregister.com/2001/05/11/microsoft_altair_basic_legend_talks/ , archive-date=2020-08-28 {{cite web , title=Great people personally responsible for advancing the art of early computers , date=2020-07-18 , website=Oldcomputers.net , url=http://www.oldcomputers.net/important-computer-people.html , access-date=2016-05-30 , url-status=live , archive-url=https://web.archive.org/web/20200828134022/http://www.oldcomputers.net/important-computer-people.html , archive-date=2020-08-28 {{cite web , title=Basic 7.0 for Windows , website=comp.lang.basic.powerbasic.narkive.com , url=http://comp.lang.basic.powerbasic.narkive.com/erBpXdwr/basic-7-0-for-windows#post4 , access-date=2016-05-30 , url-status=live , archive-url=https://web.archive.org/web/20200828134026/https://comp.lang.basic.powerbasic.narkive.com/erBpXdwr/basic-7-0-for-windows , archive-date=2020-08-28 {{cite book , title=Radio Shack Hardware Manual: Level II BASIC Reference Manual , edition=1 , date=1978 , publisher= Radio Shack , location=Fort Worth, Texas, url=https://archive.org/details/Level_II_BASIC_Reference_Manual_1st_Ed._1978_Radio_Shack , access-date=2016-05-30 , url-status=live , archive-url=https://web.archive.org/web/20200828135524/https://archive.org/details/Level_II_BASIC_Reference_Manual_1st_Ed._1978_Radio_Shack , archive-date=2020-08-28 }

/ref> {{cite book , title=Level II BASIC Reference Manual , date=1979 , publisher= Radio Shack , website=akhara.com , format=PDF , url=http://akhara.com/trs-80/docs/model1/Level%20II%20BASIC%20Reference%20Manual%20(1979)(Radio%20Shack)(pdf).zip , access-date=2016-06-02 {{cite book , title=BASIC-80 (MBASIC) Reference Manual , format=PDF , url=https://archive.org/details/BASIC-80_MBASIC_Reference_Manual , access-date=2016-05-30 {{cite book , title=Microsoft FORTRAN-80 Version 3.4 Users Manual , date=November 1980 , pages=45, 55 , website=textfiles.com , url=http://www.textfiles.com/bitsavers/pdf/microsoft/cpm/Microsoft_FORTRAN-80_Ver3.4_Users_Manual_Nov80.pdf , access-date=2016-05-30 {{cite web , url=http://ftp.gwdg.de/pub/mpsf/pc_doc/dosbesch.ps , title=Zettelsammlung MS-DOS und AT , publisher=Gruppe Datenverarbeitung am MPI für Strömungsforschung Göttingen, Max-Planck-Institut , language=de , editor-first=Michael , editor-last=Pätzold , date=April 1993 , access-date=2015-10-07 , url-status=live , archive-url=https://web.archive.org/web/20050220040002/http://ftp.gwdg.de/pub/mpsf/pc_doc/dosbesch.ps , archive-date=2005-02-20 {{cite web , url=http://www.classiccmp.org/dunfield/kyocera/t200mpln.pdf , title=Tandy 200 Multiplan Manual , website=classiccmp.org , access-date=2016-06-02
Microsoft C Microsoft Visual C++ (MSVC) is a compiler for the C, C++ and C++/CX programming languages by Microsoft. MSVC is proprietary software; it was originally a standalone product but later became a part of Visual Studio and made available in both tri ...
Pcode Specifications, page 13. (NB. Multiplan wasn't compiled to machine code, but to a kind of byte-code which was run by an interpreter, in order to make Multiplan portable across the widely varying hardware of the time. This byte-code distinguished between the machine-specific floating point format to calculate on, and an external (standard) format, which was
binary-coded decimal In computing and electronic systems, binary-coded decimal (BCD) is a class of binary encodings of decimal numbers where each digit is represented by a fixed number of bits, usually four or eight. Sometimes, special bit patterns are used for ...
(BCD). The {{mono, PACK and {{mono, UNPACK instructions converted between the two.)
{{cite book , url=http://www.textfiles.com/bitsavers/pdf/microsoft/cpm/Microsoft_COBOL-80_1978.pdf , title=Microsoft COBOL-80 , date=1978 , pages=26, 32 , website=textfiles.com , access-date=2016-05-30 {{cite web , url=http://www.textfiles.com/programming/qwk.txt , format=TXT , title=QWK Mail Packet File Layout , author-first=Patrick Y. , author-last=Lee , website=textfiles.com , access-date=2016-06-02 {{cite web , title=CSI Millennium (CSIM) format with CSI Y2K extensions , date=1998-11-17 , publisher=Commodity Systems, Inc. , location=Boca Raton, Florida, format=TXT , website=csidata.com , url=http://www.csidata.com/patch/csim.txt , access-date=2016-06-02 , url-status=dead , archive-url=https://web.archive.org/web/20160305170347/http://www.csidata.com/patch/csim.txt , archive-date=2016-03-05 , quote= €¦This document describes the abandoned CompuTrac data format, which until recently was actively used by Equis' MetaStock charting software. €¦} {{cite web , title=Converting Microsoft Binary Format to IEEE format Using VB 6 , author-first=Russ , author-last=Billard , orig-date=2001-07-13 , date=2016-05-04 , url=https://forums.codeguru.com/showthread.php?21573-Converting-Microsoft-Binary-Format-to-iEEE-format-Using-VB-6 , access-date=2016-05-30 , url-status=live , archive-url=https://web.archive.org/web/20200828155404/https://forums.codeguru.com/showthread.php?21573-Converting-Microsoft-Binary-Format-to-iEEE-format-Using-VB-6 , archive-date=2020-08-28 {{cite web , title=Help !Anybody know how to convert old M/S MBF value from Qbasic to VB6 , date=2003-07-02 , author=JerMyster , series=Visual Basic (Classic) Forum , work=Tek-Tips , url=http://www.tek-tips.com/viewthread.cfm?qid=592713 , access-date=2016-05-30 , url-status=live , archive-url=https://web.archive.org/web/20200828162727/https://www.tek-tips.com/viewthread.cfm?qid=592713 , archive-date=2020-08-28 {{cite web , author=GL88 , url=https://social.msdn.microsoft.com/Forums/vstudio/en-US/64a201b5-852d-41df-9abe-2ad2645cc937/reading-binary-format-qbasic-with-c?forum=netfxbcl , title=Reading Binary Format (QBasic) with C# , publisher=Social.msdn.microsoft.com , access-date=2016-05-30 {{cite web , url=http://r.789695.n4.nabble.com/Reading-MetaStock-data-format-in-R-td4677240.html , title=Rmetrics - Reading MetaStock data format in R , publisher=R.789695.n4.nabble.com , date=2013-09-30 , access-date=2016-05-30 {{cite web , url=https://groups.google.com/forum/#!topic/comp.os.msdos.programmer/mDyRI1wolAc , title=Google Groups , website=Groups.google.com , access-date=2016-06-02 {{cite web , title=Understanding single precision MBF , author-first=Julian M. , author-last=Bucknall , date=2018-11-03 , orig-date=2007-10-23 , publisher=boyet.com , url=http://www.boyet.com/Articles/MBFSinglePrecision.html , access-date=2016-05-30 , url-status=live , archive-url=https://web.archive.org/web/20190220020010/https://secondboyet.com/Articles/MBFSinglePrecision.html , archive-date=2019-02-20 , quote= €¦IEEE 754 Single format €¦The exponent is biased by 127. There is an assumed 1 bit before the radix point (so the assumed mantissa is 1.ffff… where f's are the
fraction A fraction (from la, fractus, "broken") represents a part of a whole or, more generally, any number of equal parts. When spoken in everyday English, a fraction describes how many parts of a certain size there are, for example, one-half, eight ...
bits) €¦Microsoft Binary Format (single precision) €¦The exponent is biased by 128. There is an assumed 1 bit after the radix point (so the assumed mantissa is 0.1ffff… where f's are the fraction bits) €¦the IEEE mantissa is twice the MBF mantissa. €¦to convert from MBF to IEEE single €¦subtract 2 from the exponent (one for the bias change, one for the mantissa factor), and then rearrange the sign and exponent bits. The fraction does not change. To convert from IEEE single to MBF, €¦add 2 to the exponent (one for the bias change, one for the mantissa factor), and then rearrange the sign and exponent bits. The fraction does not change. €¦}
{{cite web , title=Intel and Floating-Point - Updating One of the Industry's Most Successful Standards - The Technology Vision for the Floating-Point Standard , date=2016 , publisher= Intel , url=http://www.intel.com/content/dam/www/public/us/en/documents/case-studies/floating-point-case-study.pdf , access-date=2016-05-30 , url-status=dead , archive-url=https://web.archive.org/web/20160304114859/http://www.intel.com/content/dam/www/public/us/en/documents/case-studies/floating-point-case-study.pdf , archive-date=2016-03-04 (11 pages) {{cite web , url=http://nssdc.gsfc.nasa.gov/nssdc/formats/VAXFloatingPoint.htm , title=VAX Floating Point Numbers , website=nssdc.gsfc.nasa.gov , access-date=2016-06-02 , url-status=live , archive-url=https://web.archive.org/web/20200828101600/https://nssdc.gsfc.nasa.gov/nssdc/formats/VAXFloatingPoint.htm , archive-date=2020-08-28 (NB. The VAX-11/780 did not implement the "G" format yet. Although this is not directly apparent from the tables because the structures have been cut up in two-byte words, the byte order is actually the same as on modern CPUs. There isn't enough room in the exponent range for NaNs, Infinity, infinities or denormals.) {{cite web , url=http://www.ece.cmu.edu/~ece447/s15/lib/exe/fetch.php?media=vax_hwhbk_1979.pdf , title=VAX11 780 , website=Ece.cmu.edu , access-date=2016-06-02 {{cite web , title=An Interview with the Old Man of Floating-Point , publisher=cs.berkeley.edu , date=1998-02-20 , url=https://www.cs.berkeley.edu/~wkahan/ieee754status/754story.html , access-date=2016-05-30 {{cite web , title=IEEE 754: An Interview with William Kahan , website=dr-chuck.com , url=http://www.dr-chuck.com/dr-chuck/papers/columns/r3114.pdf , access-date=2016-06-02 {{cite book , title=Design of a Computer: The Control Data 6600 , author-first=James E. , author-last=Thornton , date=1970 , edition=1 , publisher=
Scott, Foresman and Company Scott Foresman was an elementary educational publisher for PreK through Grade 6 in all subject areas. Its titles are now owned by Savvas Learning Company which formed from former Pearson Education K12 division. The old Glenview headquarters o ...
, lccn=74-96462 , publication-place=Glenview, Illinois , location=Advanced Design Laboratory, Control Data Corporation , url=http://ygdes.com/CDC/DesignOfAComputer_CDC6600.pdf , access-date=2016-06-02 , url-status=live , archive-url=https://web.archive.org/web/20200828093757/http://ygdes.com/CDC/DesignOfAComputer_CDC6600.pdf , archive-date=2020-08-28 (1+13+181+2+2 pages)
{{cite web , url=https://www.cs.berkeley.edu/~wkahan/ieee754status/why-ieee.pdf , title=Why do we need a floating-point arithmetic standard? , author-first=William Morton , author-last=Kahan , author-link=William Morton Kahan , website=cs.berkeley.edu , access-date=2016-06-02 {{cite web , url=https://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf , title=How Java's Floating-Point Hurts Everyone Everywhere , author-first1=William Morton , author-last1=Kahan , author-link1=William Morton Kahan , author-first2=Joseph D. , author-last2=Darcy , website=cs.berkeley.edu , access-date=2016-06-02 {{cite book , url=https://books.google.com/books?id=sUD8CAAAQBAJ&pg=PA171 , title=Numerical Analysis and Parallel Processing: Lectures given at The Lancaster … , date=2013-12-21 , access-date=2016-05-30 , isbn=978-3-66239812-8 , author-last=Turner , author-first=Peter R. {{cite web , url=https://www.cs.berkeley.edu/~wkahan/ieee754status/Names.pdf , title=Names for Standardized Floating-Point Formats , website=cs.berkeley.edu , access-date=2016-06-02


External links

* Microsof
provides
a dynamic link library for 16-bit Visual Basic containing functions to convert between MBF data and IEEE 754. ** This library wraps the MBF conversion functions in the 16-bit Visual C(++) CRT. ** These conversion functions will round an IEEE double-precision number like ¾ ⋅ 2−128 to zero rather than to 2−128. ** They don't support
denormal In computer science, subnormal numbers are the subset of denormalized numbers (sometimes called denormals) that fill the underflow gap around zero in floating-point arithmetic. Any non-zero number with magnitude smaller than the smallest normal n ...
s at all: the IEEE or MBF single-precision number 2−128 will be converted to zero, even though it is representable in either format. ** This library is only intended for use with Visual Basic; C(++) programs are expected to call the CRT functions directly. Binary arithmetic Computer arithmetic Floating point