1. I had to multiply two integer variable.
e.g x=900;
x= x* 72; // It took larger time to multiply.
2. Then I thought to multiply it by using shift operator. And I found binary equivalent of 72 i.e 1001000. & I did multiply by:
x = (x<<6) + (x<<3); // in above binary of 72, bit 3 & bit 6 are 1 rest are 0.
And I got the same result & in much lesser time.
3. Now this can be implemented to any number as there binary number can be found & I think is a much better approach to multiply.
4. Is there any pitfall in this method or any other better method to multiply.