Browse Source

addition base case onecolumns

master
Dennis Sperzel 12 months ago
parent
commit
627200af59
  1. 7
      src/addition.c

7
src/addition.c

@ -8,5 +8,10 @@ void full_adder (int* sum, int* nextcarry, int number1, int number2, int carry)
} }
unsigned int addition(unsigned int a, unsigned int b) { unsigned int addition(unsigned int a, unsigned int b) {
return 0;
int s[1];
int nc[1] = {0};
full_adder(s, nc, a, b, 0);
return (unsigned int) s[0];
} }
Loading…
Cancel
Save