Bitwise operators can be used to perform the addition (+) operation as mentioned in below example:
int Add(int x, int y) { if (y == 0) return x; else return Add( x ^ y, (x & y) << 1); }
Bitwise operators can be used to perform the addition (+) operation as mentioned in below example:
int Add(int x, int y) { if (y == 0) return x; else return Add( x ^ y, (x & y) << 1); }