multiplication32 method
Implementation
multiplication32(int n1,
int n2) // emulates overflow of a c 32-bits unsiged integer variable, instead of the operator *. these both arguments must be non-negative integers expressible using unsigned 32 bits.
{
var sum = 0;
for (var i = 0; i < 32; ++i) {
if (((n1 >> i) & 0x1) > 0) {
sum = addition32(sum, unsigned32(n2 << i));
}
}
return sum;
}