Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Decimal from a char* to binary

I have a string that consists some decimal value, with number of digits can be more than any existing int-types can hold(I know the number of digits). Give me some hints, please, how can I convert that number to it's binary representation (so I will have other char* variable, that will consist binary).

like image 500
Alecs Avatar asked Jun 18 '26 11:06

Alecs


1 Answers

You could use something like the GNU Multiple Precision library that has support for very long numbers.

like image 125
Abrixas2 Avatar answered Jun 20 '26 23:06

Abrixas2



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!