diff --git a/src/addition.c b/src/addition.c index 0bdb599..adfc3fe 100644 --- a/src/addition.c +++ b/src/addition.c @@ -12,7 +12,7 @@ unsigned int addition(num number1, num number2) { num sum[1] = {0}; num nextcarry[1] = {0}; - for (int i = 0; i < 2; i++) + for (int i = 0; i < 8 * sizeof(num); i++) { full_adder(sum, nextcarry, number1, number2, nextcarry[0]); result ^= (sum[0] << i);