public static int multiple(int a,int b) { int result=0; int c=0; while(b!=0) { if((b&0x01)==1) { result+=a<<c; } b>>=1; c++; } return result; }
位运算实现小正整数乘法
原文:http://www.cnblogs.com/maydow/p/4825475.html