How to convert from base 4 to base 16?

2.2k Views Asked by At

I have the number 10011100010101 from base 4 and I need to conv in base 16. I wrote the number in pairs of 2 and tried to write it as such 0×16^0+1×16^1.. from left to right is it correct this way?

2

There are 2 best solutions below

2
On

$16 = 4^2$, so try splitting the number into blocks of two and convert those blocks separately

0
On

In general you'll want to go from right to left with the blocks.

In this case, it doesn't matter whether you go left to right or right to left, but if you have an odd number of digits, you'll miss the leading zero and have to do it all again.