This calculator is a simple yet effective tool that enables users to perform fundamental arithmetic operations, including addition, subtraction, multiplication, and division, on numbers with varying bases.
The result will be returned in the higher base between the two operands. Additionally, the script is capable of converting numbers from one base to another.
- Operand and Base:
operand_base
represents a number in the specified base. For example,101_2
is 101 in binary. - Operator: Supported operators are
+
,-
,*
, and/
. - Output Base: The result will be displayed in the larger base of the two operands.
Note
Photo made by Photo Contraster & Photo Rounder
- convert_to_decimal(number, base): Converts a number from a specified base to its decimal equivalent.
- convert_from_decimal(number, base): Converts a decimal number to a specified base.
- add_in_base(num1, num2, base): Performs addition in a specified base.
- subtract_in_base(num1, num2, base): Performs subtraction in a specified base.
- multiply_in_base(num1, num2, base): Performs multiplication in a specified base.
- divide_in_base(num1, num2, base): Performs division in a specified base.
- compare_in_base(num1, num2, base): Compares two numbers in a given base.
- convert_to_base(num, base): Converts a decimal number to a specified base.
- parse_math_expression(expression): Parses the input expression and extracts relevant information
- Clone the repository:
git clone https://github.com/andrijzyn/Calculator-of-various-bit-systems.git
- Navigate to the project directory:
cd Calculator-of-various-bit-systems
- Run the application:
python main.py
- After that, you can open the ~/UI/index.html file and start using the
- Python
- Flask, CORS
- Web(GUI) - HTML, CSS, JS