UVa 10469 - To Carry or not to Carry

Summary
Someone made some erronous way to calculate the addition of bits. You are to use his method and output a number that he would have generated.

Explanation
A B AopB 0 0 0   1 0  1   0 1  1   1 1  0
 * This is a relatively trivial problem if you know your logic. Using this truth table figure out which logical operator to use.
 * Remember to use unsigned integers.

Input
4 6 6 9 4000000000 1 4000000001 1

Output
2 15 4000000001 4000000000