Re: Signed multiplication

From: Nate Lawson <>
Date: Thu, 05 Nov 2009 09:38:54 -0800
Message-ID: <>
By "signed" do you mean simply that "result is negative if sign bits are
different, else positive"? Or are you trying to account for overflow


Ullrich von Bassewitz wrote:
> I'm looking for a signed 16x16 => 32 multiplication routine. Currently I'm
> using the 16x16 => 32 unsigned routine with the absolute values of the
> operands, and adjust the sign of the result if necessary. But this quite some
> overhead. 
> Is there a fast way to do it, for example by accounting for the sign in the
> shift-and-add loop? I've tried to find a solution myself, but all I came up
> with was extending the addition to 32 bits to keep the information about
> signedness, and this is at least as slow as using absolute values and negating
> the result.
> Regards
>         Uz

       Message was sent through the cbm-hackers mailing list
Received on 2009-11-05 18:00:04

Archive generated by hypermail 2.2.0.