A simple C-based calculator that performs basic arithmetic operations using bitwise operations.
- Addition (
+) - Subtraction (
-) - Multiplication (
*) - Division (
/)
-
Clone the repository:
git clone https://github.com/yourusername/binary-calculator.git cd binary-calculator -
Compile the project:
gcc -o bin_calculator main.c calculator.c -I.
Run the calculator:
./bin_calculatorExample usage in C:
#include <stdio.h>
#include "calculator.h"
int main() {
int result = calculate(10, 5, '+');
printf("Result: %d\n", result);
return 0;
}To compile and run:
gcc -o bin_calculator main.c calculator.c -I.
./bin_calculatorThis project is licensed under the MIT License.