Hi, there

I am trying to convert 0 to some large int numbers (say, pow(a,c)) to a-binary, where pow(a,c), a and c could be large, say a=3,c=100, so the pow result could easily exceed unsigned long length (2^64-1).

What I am looking for is: say a=3 c=3, so I 'd deal with 0-26 and convert them into 3-binary (sorry if i call it wrong). Let's pick 11 (in DEC) , I want to convert it to 102 (1*3^2+0*3*1+2*3^0) and store in an int array, s.t.

bit[0] = 2

bit[1] = 0

bit[2] = 1

I know for if pow(a,c) < 2^64-1 I can use && and pick each bit value, but can anyone help if pow(a,c) > 2^64-1 ? I don't even know how to deal with it since pow(a,c) can not exceed 2^64-1 at all... Actually I do not care about what the large number is, all I want is the each bit's value (0 to c-1) in that range.

Thanks in advance!