M
Mariusz Sakowski
I'm writing class which will be able to store large numbers (my
ambition is to make it able to operand on thousands of bits) and
perform various operations on it (similiar to those available with int
type). I want to store the number as binary stream, and I don't know
how to convert large decimal string (char*) to binary stream.
Converting using MOD would last for hours with really big numbers, and
in fact I don't know any other ways to convert decimal to binary.
Maybe someone could advice me how to do it? (i thought of converting
digit by digit and adding it to final stream using fast operator+
function, already implemented to work on binary streams, but again how
could I convert number like k*(10^n), where n could be thousands, to
binary?)
I'll appreciate any help, and am sorry for my poor english.
ambition is to make it able to operand on thousands of bits) and
perform various operations on it (similiar to those available with int
type). I want to store the number as binary stream, and I don't know
how to convert large decimal string (char*) to binary stream.
Converting using MOD would last for hours with really big numbers, and
in fact I don't know any other ways to convert decimal to binary.
Maybe someone could advice me how to do it? (i thought of converting
digit by digit and adding it to final stream using fast operator+
function, already implemented to work on binary streams, but again how
could I convert number like k*(10^n), where n could be thousands, to
binary?)
I'll appreciate any help, and am sorry for my poor english.