Uses XOR and AND gates to calculate SUM and CARRY in C++