Path: utzoo!attcan!uunet!lll-winken!lll-lcc!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!purdue!i.cc.purdue.edu!k.cc.purdue.edu!l.cc.purdue.edu!cik
From: cik@l.cc.purdue.edu (Herman Rubin)
Newsgroups: comp.arch
Subject: Re: more on unsigned
Summary: Only if the hardware is appropriate
Message-ID: <792@l.cc.purdue.edu>
Date: 6 Jun 88 12:12:32 GMT
References: <2433@uvacs.CS.VIRGINIA.EDU>
Organization: Purdue University Statistics Department
Lines: 31

In article <2433@uvacs.CS.VIRGINIA.EDU>, wulf@uvacs.CS.VIRGINIA.EDU (Bill Wulf) writes:

> Now, a multi-precision number can be thought of in the same way.
> That is, each word can be viewed as a coefficient in a polynomial
> of the form
> 
> 	w2 w1 w0 == w2*(2**32)**2 + w1*(2**32)**1 + w0*(2**32)**0
> 
> NOW -- no one ever said that these coefficients must be positive!!!

		(much deleted)

What Bill says is correct; one can do multiple precision arithmetic
without unsigned arithmetic.  It is not too difficult to do it in
sign-magnitude arithmetic, and a method has been proposed many years
ago to use both signs and allow a little stretch to avoid carry
propagation.  Since not everyone is familiar with this, in base 10
the digits would go from -5 to 4, but carry would extend the range
to -6 to 5.  Note that this loses a bit due to ambiguities.

However, every computer I have seen since the IBM 70x(x) series does not
compute double products of signed numbers in such a useful manner!  They
all produce the product as a signed number followed by an unsigned number.
Now if the unsigned number has its leading bit a forced 0, one can do as Bill 
suggests for multiple precision.  The great majority of computers do not 
have this feature.  In that case, one must resort to slightly less than
half word arithmetic or other kludges.  
product with the least significant part unsigned.
-- 
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907
Phone: (317)494-6054
hrubin@l.cc.purdue.edu (ARPA or UUCP) or hrubin@purccvm.bitnet