converting from base 10 to base 4

i am converting a base 10 number to base 4, guide me in this case please.
Ahh, you continue you quest: http://www.cplusplus.com/forum/general/100956/

What you will actually do, is to write out the string representation of a number in base 4.

We do know that if you divide the number with 4, then the remainder has value in range [0..3] and is the least significant digit. On the other hand, normal integer division by 4 produces a number too.

Say 7. 7/4=1. 7%4=3. 4*1 + 3 = 7.
Too easy?
Take 17. 17/4=4. 17%4=1. But 4/4=1 and 4%4=0. Thus, 4*4*1+4*0+1=17.
Topic archived. No new replies allowed.