Hi all guys.....
___________________________
suppose A, B, C, and D are 32-bit number and we form two numbers N1 and N2 as under ---
N1 = Aw + B
N2 = Cw + D
where w is the base of the number system.
now, a = A*C, b = B*D and c = (A+C) * (B+D) - a - b
hence when
P = N1*N2
= a (w^2) + c (w) + b
Hence, inorder to multiply N1 and N2 we only required 3 multiplications, 2 additions and 2 subtraction.
Thus, saving 1 multiplication.. This method of multiplying is called KaratSuba- Ofman Multiplication Method.
_____________________________________________________
But can somebody tell me how to achieve this multiplication through ASM because I am not getting how to get the output..
Regards
___________________________
suppose A, B, C, and D are 32-bit number and we form two numbers N1 and N2 as under ---
N1 = Aw + B
N2 = Cw + D
where w is the base of the number system.
now, a = A*C, b = B*D and c = (A+C) * (B+D) - a - b
hence when
P = N1*N2
= a (w^2) + c (w) + b
Hence, inorder to multiply N1 and N2 we only required 3 multiplications, 2 additions and 2 subtraction.
Thus, saving 1 multiplication.. This method of multiplying is called KaratSuba- Ofman Multiplication Method.
_____________________________________________________
But can somebody tell me how to achieve this multiplication through ASM because I am not getting how to get the output..
Regards