Web server type - 186 ARITHMETIC 4.1 senidenary or sedecimal or even

186 ARITHMETIC 4.1 senidenary or sedecimal or even sexadecimal, but the latter is perhaps too risquk for computer programmers. The comment by Mr. Wales that is quoted at the beginning of this chapter has been taken from the discussion printed with Phillips s paper. Another man who attended the same lecture objected to the octal system for business purposes: 5% becomes 3.i462 per 64, which sounds rather horrible. Phillips got the inspiration for his proposals from an electronic circuit that was capable of counting in binary [C. E. Wynn-Williams, Proc. Roy. Sot. London Al36 (1932), 312-3241. Electromechanical and electronic circuitry for general arithmetic operations was developed during the late 193Os, notably by John V. Atanasoff and George R. Stibitz in the U.S.A., L. Couffignal and R. Valtat in France, Helmut Schreyer and Konrad Zuse in Germany. All of these inventors used the binary system, although Stibitz later developed excess-3 binary-coded- decimal notation. A fascinating account of these early developments, including reprints and translations of important contemporary documents, appears in Brian Randell s book The Origins of Digital Computers (Berlin: Springer, 1973). The first American high-speed computers, built in the early 194Os, used decimal arithmetic. But in 1946, an important memorandum by A. W. Burks, H. H. Goldstine, and J. von Neumann, in connection with the design of the first stored-program computers, gave detailed reasons for the decision to make a radical departure from tradition and to use base-two notation [see John von Neumann, Collected Works 5, 41-651. Since then binary computers have multi- plied. After a dozen years of experience with binary machines, a discussion of the relative advantages and disadvantages of radix-2 notation was given by W. Buchholz in his paper Fingers or Fists? [CACM 2 (December 1959), 3-111. The MIX computer used in this book has been defined so that it can be either binary or decimal. It is interesting to note that nearly all MIX programs can be expressed without knowing whether binary or decimal notation is being used-even when we are doing calculations involving multiple-precision arith- metic. Thus we find that the choice of radix does not significantly influence computer programming. (Noteworthy exceptions to this statement, however, are the Boolean algorithms discussed in Section 7.1; see also Algorithm 4.5.2B.) There are several different methods for representing negative numbers in a computer, and this sometimes influences the way arithmetic is done. In order to understand these other notations, let us first consider MIX as if it were a decimal computer; then each word contains 10 digits and a sign, for example -12345 67890. (2) This is called the signed-magnitude representation. Such a representation agrees with common notational conventions, so it is preferred by many programmers. A potential disadvantage is that minus zero and plus zero can both be represented, while they usually should mean the same number; this possibility requires some care in practice, although it turns out to be useful at times. Most mechanical calculators that do decimal arithmetic use another system called ten s complement notation. If we subtract 1 from 00000 00000, we get

Leave a Reply