How do we add two 64 bit numbers using 32 bit arithmetic??
The C code previously posted is unnecessarily verbose:
unsigned a1, b1, a2, b2, c1, c2; c1 = a1 + b1; c2 = a2 + b2; if (c1 < a1) c2++;
The 'a1' in the 'if' can be replaced with 'b1' as well. On overflow, c1 will be less than both a1 and b1.