I am trying to solve Problem 16 of Project Euler without using Big Integer libraries like GMP.

I came across Binary-To-BCD algorithm to encode 8 bit number as corresponding digits in decimal representation.

I was wondering if same method would apply to, let say, 1008 bit (as it is multiple of 8) number. In that case, it would be easy to represent 2^1000 in char BCD[501] and run the algorithm on it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.