Wednesday, June 15, 2005

The Signed Multiplier

Here's a test of a multiplier that can handle both signed and unsigned inputs, as promised. As I'd expected, there was an easier and faster way to do it than sign-extending the inputs. Since the sign extension would have produced either an 8-bit -1 or an 8-bit zero, if each high bit is nonzero I just have to multiply the other byte by -1 [which is as easy as a complement-and-add-one] and shift it by 8 bits [which is trivially done in the routing].


Post a Comment

Links to this post:

Create a Link

<< Home