I
Ilya Kalistru
Guest
Hello.
I need to add two unsigned numbers modulo 2**32-1.
Now it's done in very inefficient way: at first clock cycle there is simple addition of two 32-bit unsigned numbers with 33-bit result and on second cycle if the result >= 2**32-1, we add 1 and take only 32 bits of that.
Does anybody know a better way to do that?
I need to add two unsigned numbers modulo 2**32-1.
Now it's done in very inefficient way: at first clock cycle there is simple addition of two 32-bit unsigned numbers with 33-bit result and on second cycle if the result >= 2**32-1, we add 1 and take only 32 bits of that.
Does anybody know a better way to do that?