The following figure and it's caption is taken from quant-ph/9511018 (Vedral et.al.: Quantum networks for elementary arithmetic operations).
Basic carry and sum operations for the plain addition network. i) the carry operation (note that the carry operation perturbs the state of the qubit b). ii) the sum operation.
The Carry Network is a sequence of control-control-not gate, a control-not gate and another control-control-not gate.
void EqcsVedral::carry(EqcsGateArray &a, int b0, int b1, int b2, int b3) { a.push_back(CCNot(b0, b1, b2)); a.push_back(CNot(b1, b2)); a.push_back(CCNot(b0, b1, b3)); }
void EqcsVedral::rcarry(EqcsGateArray &a, int b0, int b1, int b2, int b3) { a.push_back(CCNot(b0, b1, b3)); a.push_back(CNot(b1, b2)); a.push_back(CCNot(b0, b1, b2)); }
void EqcsVedral::sum(EqcsGateArray &a, int b0, int b1, int b2) { a.push_back(CNot(b0, b1)); a.push_back(CNot(b0, b2)); }
void EqcsVedral::rsum(EqcsGateArray &a, int b0, int b1, int b2) { a.push_back(CNot(b0, b2)); a.push_back(CNot(b0, b1)); }