最近在面试,所以就把遇到的题目总结在这里,供大家(自己)复习用。
public static int bitAdd(int a,int b) { if(b==0)return a; int sum = a^b; int carry =(a&b)<<1; return bitAdd(sum,carry); }