c++ - What is the fastest way to convert very large binary number representation to decimal representation? -


i've got big number stored in binary representation , need output in decimal representation:

struct biginteger {     int *parts; // 1 part stores 12 bits of number, range: 0 0xfff     int parts_n; };  void converttodecstring( biginteger *in, std::string &out ); 

i can't find approach, in linear time.

for demostration can chose order parts. i've got ordered in way, [0] lowest value, , [n-1] highest value.

i afraid cannot done in linear time, because every read bit affects digits of decimal representation. longer digit, longer every new read bit takes.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -