How can we multiply an integer by 7 by using bitwise operators

Showing Answers 1 - 19 of 19 Answers

archie

  • Sep 5th, 2007
 

7 = 1+2+4, so we can do one left shift and then one more left shift and add these two numbers to the original number to get multiplied answer.

  Was this answer useful?  Yes

pranav

  • Sep 11th, 2007
 

Good answer by archie

Another answer would be: left shift the number thrice and negate the result by number.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions