A Super-Fast C-Program for converting very huge/big numbers from one base to another base without Limitation.
- Super-Fast - It's written in C, so it's super-fast.
- No Limitation - It can convert very huge/big numbers from one base to another base without any limitation.
- Easy to Use - It's very easy to use.
- Cross-Platform - It's cross-platform, so it can be used on any platform.
- Open-Source - It's open-source, so you can use it for free.
int convertCharToInt(char c): Function to convert a character to its digit representationchar convertIntToChar(int n): Function to convert a digit to its character representationBigNumber* BigNumberCreate(int capacity): Function to create a new empty BigNumber with a given capacityBigNumber* stringToBigNumber(char *string): Function to create a new BigNumber from a stringBigNumber* intToBigNumber(int number): Function to create a new BigNumber from a intvoid BigNumberAppendBegin(BigNumber *number, int digit): Function to add a new digit at the beginning of a BigNumbervoid BigNumberAppendEnd(BigNumber *number, int digit): Function to add a new digit at the end of a big numberint BigNumberGet(BigNumber *number, int index): Function to get the digit at a given index of a BigNumberint BigNumberGetNumber(BigNumber *number): Function to get the int representation of a BigNumbervoid BigNumberFree(BigNumber *number): Function to free the memory occupied by a big numbervoid BigNumberPrintString(BigNumber *number): Function to print a BigNumber in charachter formvoid BigNumberPrint(BigNumber *number): Function to print a BigNumberBigNumber* copyBigNumber(BigNumber *number): Function to deep copy a BigNumbervoid stringReverse(char *str): Function to reverse a stringchar* stringTrim(char* str): Function to remove leading whitespaces of a stringchar *fileReads(char *filepath): Function to read contents of a fileBigNumber* BigNumberMod(BigNumber* number1, int number2): Function to calculate modulu of two large numberBigNumber* BigNumberSub(BigNumber* number1, BigNumber* number2): Function to calculate subtraction of two large numberBigNumber* BigNumberDiv(BigNumber* number1, int number2): Function to calculate division of two large numberint BigNumberCompare(BigNumber* number1, BigNumber* number2): Function to compare two large numberBigNumber* convertBase10ToN(BigNumber* number, int n): Function to convert a positive numbernumberto its digit representation in basen.
$ ./BigNumberBaseConverter 10 2 123456789The above command will convert the number 123456789 from base 10 to base 2 and print the result.
$ ./BigNumberBaseConverter -f input.txt 10 2 > result.txtThe above command will convert the number from the file filename.txt from base 10 to base 2 and print the result to the file result.txt.
$ ./BigNumberBaseConverter -f input.txt 10 2The above command will convert the number from the file filename.txt from base 10 to base 2 and print the result to the console.
© Copyright 2022, Max Base