M BUZZ CRAZE NEWS
// general

Definition of Base Formula

By Daniel Rodriguez
$\begingroup$

I'm not sure exactly how the "definition of bases" in the proof below works. I get it for base $10$, since $$642_{10}=6(10)^2+4(10)+2=642$$ but does that then extend to, for e.g, $$642_3=6(3)^2+4(3)+2=54+12+2=68$$ $\phantom{}$

enter image description here

$\endgroup$ 1

1 Answer

$\begingroup$

Not exactly writing a number $x$ in base $b$ as $x=[x_nx_{n-1}\dots x_2x_1x_0]_b$ means indeed that $$x=x_0+x_1 b+x_2b^2+\dots+x_n b^n$$ where the $b$-digits $x_i$ satisfy the constraint: $$\forall i\in\{0,\dots, n\},\quad 0\le b_i <b.$$ It is very easy to convert in base $10$ to base $b$ by the method of successive divisions:

  • set $x_0=x\bmod b$, $q=\Bigl\lfloor\dfrac xb\Bigr\rfloor$,
  • $x_1=q\bmod b$,
  • replace $q$ with $\Bigl\lfloor\dfrac qb\Bigr\rfloor$ end repeat the previous step until the quotient is $0$.

The successive remainders are the digits of $x$ in base $b$ in reverse order.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy