The conversation between human and AI assistant.
How do I add two numbers without using any operator C/C++?
Yes, I am familiar with bitwise operations. Can you explain how I can use them to add two numbers?
Sure. One way to add two numbers a and b is to use xor bitwise operator (^), which gives you their sum without carry. Then, use the and bitwise operator (&), which gives you the carry. Finally, left shift the carry by 1 and continue the process until there is no carry left. Do you need me to give you an example?