Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ncrlnk!emdeng!hrich From: hrich@emdeng.Dayton.NCR.COM (George.H.Harry.Rich) Newsgroups: comp.arch Subject: Re: Decimal Arithmetic Message-ID: <286@emdeng.Dayton.NCR.COM> Date: 20 Mar 90 13:51:58 GMT References: <27696@cup.portal.com> <76700180@p.cs.uiuc.edu> Reply-To: hrich@emdeng.UUCP (George.H.Harry.Rich) Organization: NCR, E&M Dayton Lines: 72 In article <76700180@p.cs.uiuc.edu> gillies@p.cs.uiuc.edu writes: > >nEven today, maybe we don't know the full intellectual costs of using >binary numbers in computers. I imagine Von Neumann weighed the >technical advantages, and ignored the human factors. I imagine he & >his group did not forsee these costs: I don't think that Van Neumann was the real decision maker in this case. A number of fairly early computers had fairly heavy decimal orientation in their instruction set if not in their basic data representation. I believe that the added complexity of the decimal orientation cost more in human terms than the familiarity of the representation and the ease of conversion saved, and this is real reason why today so few processors bother with decimal representation. > >(1) Professional programmers must be fluent in 3-4 bases > (binary, octal/hex, decimal), boolean logic, and arithmetic systems > (sign-magnitude, one's complement, two's complement). This is no > trouble to Von Neumann, but try to teach most high-school kids this. I don't think most professional programmers have to be particularly fluent in any base. If they're doing numeric work they do have to understand the general principles of arithmetic in a base independent manner. Tools for conversion and arithmetic in multiple bases have been around for a long time. >(2) Numerical algorithms must deal with binary roundoff. Why is this harder to deal with than decimal roundoff? >(3) Accounting algorithms must hassle with representing .1 in binary Although it is a slight hassle, doing all your work in pennies is a very simple adjustment. The problem is not as much with binary as with binary integers which don't have enough digits. >(4) The industry struggled for years with 6/7-bit characters (too > little), and finally settled on 8-bit characters (too much). I believe that the 8 bit character is going to prove far from adequate. If you look at the character set on the IBM PC you will see it wipes out 8 bits with great ease. The Japanese have adopted 16 bit standards for characters and will use it up eventually (there are in excess of 50,000 Chinese characters). I suggest that if you don't know how big the character set you use really is that you look in the appendix of an unabridged dictionary. > In decimal, 2-digit characters would have made sense on day 1. The decimal machine I first worked on used 1-1/2 digit characters, with a decimal digit represented in 4 bits. Something about space on the card. >(5) The necessity to learn / program conversion algorithms. > >Can anyone think of other human costs of binary numbers? I've worked on several machines which had extensive decimal capability. My experience was that in general these instruction sets got you into considerable complexity (to ameliorate the effects of the relatively inefficent decimal arithmetic), with such things as special stop symbols, or other indicators of the actual length of the decimal integer. We have yet to find a more efficent method of representing a decimal digit electronically than as four binary digits, and until we do, at some level there are going to be human costs associated with the basically binary representation. However, I think these costs are relatively small compared with the other human factors associated with computing. Regards, Harry Rich