From a75b5ab0cfdf7bd67288463ce72d41bf21b24f5c Mon Sep 17 00:00:00 2001 From: Dennis Sperzel Date: Tue, 30 Jan 2024 18:40:12 +0100 Subject: [PATCH] addition base case 0+0=0 --- src/addition.c | 4 ++++ src/addition.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/addition.c b/src/addition.c index 6d7ca86..aaf9b6a 100644 --- a/src/addition.c +++ b/src/addition.c @@ -5,4 +5,8 @@ void full_adder (int* sum, int* nextcarry, int number1, int number2, int carry) sum[0] = number1 ^ number2 ^ carry; nextcarry[0] = (number1 & number2) | (number1 & carry) | (number2 & carry); +} + +unsigned int addition(unsigned int a, unsigned int b) { + return 0; } \ No newline at end of file diff --git a/src/addition.h b/src/addition.h index abb1cd4..8a492c8 100644 --- a/src/addition.h +++ b/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