title: Binary to base 4
body: <p>How would I convert a number from binary to base 4 <code>without using extra space</code>? For e.g. if binary is 1010 then it would be 22 in base 4? I would like to have the algorithm rather than doing it by some in built functions and what about if I add a condition that I don't have to generate any string as output. I have to use the given string space to do that.</p>