Uses XOR and AND in C++ to compute SUM and CARRY.