Browse Source

addition base case 0+0=0

master
Dennis Sperzel 11 months ago
parent
commit
a75b5ab0cf
  1. 4
      src/addition.c
  2. 2
      src/addition.h

4
src/addition.c

@ -6,3 +6,7 @@ void full_adder (int* sum, int* nextcarry, int number1, int number2, int carry)
nextcarry[0] = (number1 & number2) | (number1 & carry) | (number2 & carry);
}
unsigned int addition(unsigned int a, unsigned int b) {
return 0;
}

2
src/addition.h

@ -3,4 +3,6 @@
void full_adder (int* sum, int* nextcarry, int number1, int number2, int carry);
unsigned int addition(unsigned int a, unsigned int b);
#endif // ADDITION_H
Loading…
Cancel
Save