Xref: utzoo comp.lang.misc:3509 comp.arch:11499
Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!bionet!apple!malcolm
From: malcolm@Apple.COM (Malcolm Slaney)
Newsgroups: comp.lang.misc,comp.arch
Subject: Re: Numbers (was Re: Fast conversions)
Summary: Fixed Point Useful and Fast
Keywords: fixed point integer
Message-ID: <34993@apple.Apple.COM>
Date: 24 Sep 89 19:22:21 GMT
References: <832@dms.UUCP> <688@UALTAVM.BITNET> <9dAz02zs58y201@amdahl.uts.amdahl.com> <27935@winchester.mips.COM> <136@bbxsda.UUCP> <1989Sep22.201906.10618@utzoo.uucp> <6244@pt.cs.cmu.edu>
Organization: Apple Computer Inc, Cupertino, CA
Lines: 39

Donald Lindsay writes:
>The military world has always been fond of putting decimal points in
>the middle of binary integers, and calling it "fixed point". 
There is a good reason for doing this....in many signal processing algorithms 
it makes much better use of the available silicon.  It's just that the military
has lots of money for optimizing performance this way.

Military machines aren't the only users of this "hack."  The MSSP machine
designed by Richard Lyon while he was a Schlumberger is a SIMD bit-serial 
signal processing machine that was designed to do lots of arithmetic in a 
hurry.  The only arithmetic format supported on the machine was a 32 bit 
fixed point number that had three binary bits to the left of the decimal point 
(maximum range +/- 8.)  Most signal processing algorithms normalize their 
numbers so they use all the bits.  Then filters are designed to keep the 
numbers at about the same magnitude so that overflow isn't a problem.

>In general, people would be better off if they could say something
>like
>	type MILLVOLT is integer;
>	type VOLT is MILLIVOLT * 1000;
(Don't you mean MILLIVOLT/1000?)
The solution isn't this simple.  Most people don't multiply millivolts but
if you simply treated them as integers, as in this case, the decimal point
would be in the wrong place.  The advantage of doing this in hardware is that
the shift comes for free.

I would never dream of trying to convince somebody like MIPs to incorporate
fixed point arithmetic into their general purpose machines, but for many
dedicated signal processing processors this is the best way to go.  I don't
know how to incorporate this type of number into a programming language but I 
have to give the ADA designers at least credit for trying.

					Malcolm 
					Apple Speach and Hearing Project
P.S.  Neural modelling is another good application area for fixed point
arithmetic.  Most studies I've seen only show 8 bits of dynamic range in
the average firing rate of a neuron.  If you, instead, consider a simulation
at a lower level then all you need is a one bit variable since the information
is carried in the timing.