How to convert any number of base 2-9 to base 10 or decimal and after convert decimal to any number base 2-9 as per input (two converters). Please do not ignore the decimal (base 10) part as I said. The number would be maximum of 4 digits and if it is overflowing then return the next possible base like if a number is converted from base 8 to 2 and it is overflowing then return next possible bigger base which would not be more than 4 digits. I also got help previously from this forum, so I except this time also. Thx in advanced :)

Develop the algorithm in two stages. Convert any base to base 10. Then, convert base 10 to any base.

How are you getting the numbers? Text? How do you know the base of the first number?

And since this is homework, we will probably only give hints. If it is *not* homework, then your constraints are pretty arbitrary.

I'm pretty sure that there was another thread about this less than a few hours ago; there were definitely different replies. What happened to it?

Did your teacher provide an outline of the algorithm ?

(I wonder why my post in this thread was removed? The thread sounds like a request for someone to do the OP's school/college homework. I was trying to establish whether or not it is school./college homework. )

Just practicing C. Actually I was trying my brother to help (he is in 7 grade, making a project). I am a student of hardware. But somehow I did not get help. I will say a true thing that I forgot about bases conversion (Not totally)!!! I used a array. I knew the size of it so I find out the remainder of of the number by 10, converted to different digits then using normal method convert it into decimal http://www.purplemath.com/modules/numbbase2.htm. Then created a loop repeating and divide it to form the other base. The work is done. Thanks that so much for discussion. Sorry the question should be 40 digits sorry. This was actually silly. Do not know why C is bad for me, better sit with transistors and create the circuit. I did not get chance for electricals. But somehow thanks. (Sorry for my informality and bad english and ofcourse a bit sillyness). But arduino is better than C++, (Actually they are same but still).

stowite: I wonder why my post in this thread was removed? The thread sounds like a request for someone to do the OP's school/college homework. I was trying to establish whether or not it is school./college homework.

The comments were removed because I didn't feel they added anything to the discussion

AWOL: The comments were removed because I didn't feel they added anything to the discussion

I would have expected you to see that I was trying to establish the OP's reason for starting the thread. The OP seemed to be trying to get someone to do his homework for him and I was trying to be sure of the facts before providing help. I can help him but I won't help him cheat.

Please re-insert my post.

stowite: Please re-insert my post.

Your single, now pointless, sentence has been restored.

Enough of the sidebar.