Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am having a problem converting 727(base 10) to base 5. What is the algorithm to do it? I am getting the same number when doing so: $7*10^2 + 2*10^1+7*10^0 = 727$, nothing changes. Help me figure it out!

share|improve this question

4 Answers 4

up vote 12 down vote accepted

You need to count in terms of $5^0, 5^1, 5^2, 5^3$ and $5^4$, not in term of $100 ,10$ and $1$.

Start by the highest power of $5$ smaller than your number, i.e. $5^4=625$ here, and check how much you can multiply it without exceding (this will be a number in $1,2,3,4$).

Take the leftover (base 10, 727-625=102) and repeat until you reach $0$.

You should have $$ \begin{align} 727_{10}&= 625+100+2\\ &= 1\times 5^4+4\times 5^2+2\times 5^0 \\ &= 10402_5. \end{align} $$

share|improve this answer

Trick: divide consecutively the quotients by $\;5\;$ and keep aside the residues :

$$\begin{align*}\frac{727}5=145+\frac25\longrightarrow& \color{red}2\\ \frac{145}5=29\longrightarrow&\color{red}0\\ \frac{29}5=5+\frac45\longrightarrow&\color{red}4\\ \frac55=1\longrightarrow&\color{red}0\\ \frac15=\frac15\longrightarrow&\color{red}1\end{align*}$$

Now put them in inverse order and voila!

$$727_{10}=10402_5$$

Can you see why it works?

share|improve this answer
1  
Thanks for the clear explanation –  MathDisease Apr 8 at 20:54
    
Isn't this a duplicate of math.stackexchange.com/a/745731/72616? –  Quincunx Apr 9 at 3:16
    
Not really, @Quincunx...why? –  DonAntonio Apr 9 at 10:51

You have to keep dividing by $5$ and write all the remainders.

So

$$727 = 5\cdot 145 + 2$$ $$145 = 5\cdot29 + 0$$ $$29 = 5\cdot5 + 4$$ $$5 = 5\cdot1 + 0$$ $$1 = 5\cdot0 + 1$$

Write all the remainders in reverse: $10402$

And ta-da! There is your answer :-)

share|improve this answer

The trick is to realize that \begin{align*} 727 &= 625 + 0*125 + 4*25 + 0*5 + 2 \\ &= 5^4 + 0 *5^3 + 4*5^2 + 0*5^1 + 2*5^0. \end{align*} So the answer is $10402$.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.