From 8993cdde83dfcd3fa9b1afd0bafe9975583d03e3 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 15:59:18 +0000 Subject: [PATCH] Added bitwiseXOR function for bitwise XOR operation --- src/main/c/main_taschenrechner.c | 6 ++++++ src/main/c/taschenrechner.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index e0bb699..d9bda36 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -73,6 +73,12 @@ int bitwiseOR(int num1, int num2) { return num1 | num2; } +// Bitwise XOR function +int bitwiseXOR(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 b3cc747..76acfb3 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -35,6 +35,9 @@ int bitwiseAND(int num1, int num2); // Bitwise OR function int bitwiseOR(int num1, int num2); +// Bitwise XOR function +int bitwiseXOR(int num1, int num2); + int mode(int userChoice); int displayMenu();