Tuesday, August 16, 2011

Algorithm for multiplying signed binary numbers?

The easiest way would be to write a routine to convert it to decimal, do the math, and then convert back to binary. There is no easy way to do it with straight binary since all math functions work on decimals. You could always write a routine to multiple every digit in the top by every digit on the bottom, allowing for the position of the bottom digit. Now you have a series or binary numbers to add and need another routine.

No comments:

Post a Comment