From 08980879044d5fe5885dfab94b44a15eccfb4844 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 15:55:05 +0000 Subject: [PATCH] Added bitwiseAND function for bitwise AND operation --- src/main/c/main_taschenrechner.c | 5 +++++ src/main/c/taschenrechner.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index fe59f96..e365a95 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -62,6 +62,11 @@ double exponentialFunction(double x) { return exp(x); } +// .. +// Bitwise AND function +int bitwiseAND(int num1, int num2) { + return num1 & num2; +} // scientificmode int scientificMode(){ diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 17f2ce2..866141a 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -28,6 +28,10 @@ double logarithmBase2Function(double x); // Exponential function double exponentialFunction(double x); +// .. +// Bitwise AND function +int bitwiseAND(int num1, int num2); + int mode(int userChoice); int displayMenu();