There is an x86 assembly instruction ADC. I\'ve found this means "Add with carry". What does this mean/do? How would one implement the behavior of thi
There is a bug in this. Try this input:
unsigned first[10] = {0x00000001};
unsigned second[10] = {0xffffffff, 0xffffffff};
The result should be {0, 0, 1, ...} but the result is {0, 0, 0, ...}
Changing this line:
carry = (first[i] > result[i]);
to this:
if (carry)
carry = (first[i] >= result[i]);
else
carry = (first[i] > result[i]);
fixes it.