[comp.arch] overflow in optimized multiplication

kruger@16bits.dec.com (Bear with me) (03/04/88)

Lawrence Crowl writes that there is no easy way to tell when you've really
created an overflow condition in a partial computation. While this may be true
in current architectures, it does not have to be. There are two cases:

x*5 == x << 2 + x

in which you want to OR the overflow condition, and

x*7 == x << 3 - x

in which you want to XOR the overflows at each step.

Even with multiple levels of doing this, you can keep this methodology and
effectively keep track of overflow -- given appropriate (and minimal) hardware
support.

dov