Base conversion

For students of class 11-12 (age 16+)
User avatar
Abdul Muntakim Rafi
Posts: 173
Joined: Tue Mar 29, 2011 10:07 pm
Location: bangladesh,the earth,milkyway,local group.

Base conversion

Unread post by Abdul Muntakim Rafi » Fri Dec 09, 2011 10:23 am

Guys which base conversion method do you use? Suppose you need to convert any given number from base 10 to base x... How do you do it?
Man himself is the master of his fate...

sourav das
Posts: 461
Joined: Wed Dec 15, 2010 10:05 am
Location: Dhaka
Contact:

Re: Base conversion

Unread post by sourav das » Fri Dec 09, 2011 11:14 am

Step:1 Divide the number by $x$, get a remainder, that will be your rightmost digit in base x
..........
.........
Step:i if the quotient of (i-1)th step is less than x that it'll be the last digit in (x base); else Divide the number by $x$ get a remainder, that will be your i'th digit(from right) in base x

Find out why it'll work. :)
You spin my head right round right round,
When you go down, when you go down down......
(-$from$ "$THE$ $UGLY$ $TRUTH$" )

User avatar
Abdul Muntakim Rafi
Posts: 173
Joined: Tue Mar 29, 2011 10:07 pm
Location: bangladesh,the earth,milkyway,local group.

Re: Base conversion

Unread post by Abdul Muntakim Rafi » Fri Dec 09, 2011 11:50 am

I use this technique too... :D Got it from the net... And I think you made a typing mistake in this line...
Step:i if the quotient of (i-1)th step is less than x that it'll be the last digit in (x base)
It will be the first digit... the last digit is the first remainder we get when we divide the number by x...

And it works cause we are doing all these to present the number like this

\[i x^n+ R_{n}x^{n-1}+R_{n-1}x^{n-2}+... ... ...+R_{2}x^1+R_{1} \]

\[R_{n},R_{n-1},..........,R_{2},R_{1} \]
are remainders we get each time we divide by $x$... $i$ is the quotient less than $x$
Man himself is the master of his fate...

sourav das
Posts: 461
Joined: Wed Dec 15, 2010 10:05 am
Location: Dhaka
Contact:

Re: Base conversion

Unread post by sourav das » Fri Dec 09, 2011 12:04 pm

I meant to say last digit if you read the number from right to left. :)
You spin my head right round right round,
When you go down, when you go down down......
(-$from$ "$THE$ $UGLY$ $TRUTH$" )

User avatar
Abdul Muntakim Rafi
Posts: 173
Joined: Tue Mar 29, 2011 10:07 pm
Location: bangladesh,the earth,milkyway,local group.

Re: Base conversion

Unread post by Abdul Muntakim Rafi » Fri Dec 09, 2011 12:11 pm

Oh yes... you mentioned that... :D
Man himself is the master of his fate...

User avatar
Labib
Posts: 411
Joined: Thu Dec 09, 2010 10:58 pm
Location: Dhaka, Bangladesh.

Re: Base conversion

Unread post by Labib » Fri Dec 09, 2011 12:50 pm

How do you do the opposite?
For example...

$BOOK_{base 8}=BOOK_{base 7}+BOOK_{base 5}$.
Here $B,O,K$ are three different digits...
Find their value...
Please Install $L^AT_EX$ fonts in your PC for better looking equations,
Learn how to write equations, and don't forget to read Forum Guide and Rules.


"When you have eliminated the impossible, whatever remains, however improbable, must be the truth." - Sherlock Holmes

User avatar
nafistiham
Posts: 829
Joined: Mon Oct 17, 2011 3:56 pm
Location: 24.758613,90.400161
Contact:

Re: Base conversion

Unread post by nafistiham » Fri Dec 09, 2011 3:12 pm

well there is a short way to conver bases.
take the number and start dividing it with the new base $x$
every time keep the remainder aside and do the division again.
this process will go on until you get the divisor smaller than $x$
now, arrange the last divisor and the remainders in the oppposite direction you get it.
as it is a long term, i am not giving an example.if you don't understand something here, please post.i'll give an example.
\[\sum_{k=0}^{n-1}e^{\frac{2 \pi i k}{n}}=0\]
Using $L^AT_EX$ and following the rules of the forum are very easy but really important, too.Please co-operate.
Introduction:
Nafis Tiham
CSE Dept. SUST -HSC 14'
http://www.facebook.com/nafistiham
nafistiham@gmail

User avatar
Abdul Muntakim Rafi
Posts: 173
Joined: Tue Mar 29, 2011 10:07 pm
Location: bangladesh,the earth,milkyway,local group.

Re: Base conversion

Unread post by Abdul Muntakim Rafi » Fri Dec 09, 2011 3:34 pm

Hey what can we do if we are to convert any given number from base x to y ... I have an idea...
base x-->base 10-->base y ... Please share if you know any direct method...

Labib, the opposite way is that- suppose a number is abc (base x)
Now to go base 10...

$a x^2 + bx + c $
Calculate and you got the result... :D

And how to solve your problem... I have so far found that
$44B = K + 14 O $
Then what to do... Trial & Error!
Man himself is the master of his fate...

User avatar
Labib
Posts: 411
Joined: Thu Dec 09, 2010 10:58 pm
Location: Dhaka, Bangladesh.

Re: Base conversion

Unread post by Labib » Fri Dec 09, 2011 4:33 pm

Darn!!
Really nice help from you, Rafi!! Thanks! :D
Solution: $B=2,O=6,K=4.$
Please Install $L^AT_EX$ fonts in your PC for better looking equations,
Learn how to write equations, and don't forget to read Forum Guide and Rules.


"When you have eliminated the impossible, whatever remains, however improbable, must be the truth." - Sherlock Holmes

User avatar
Abdul Muntakim Rafi
Posts: 173
Joined: Tue Mar 29, 2011 10:07 pm
Location: bangladesh,the earth,milkyway,local group.

Re: Base conversion

Unread post by Abdul Muntakim Rafi » Sat Dec 10, 2011 12:03 pm

Labib, you are welcome friend. :D
And is $O=6$ a valid answer? Cause if $O=6$ then how can we write $BOOK$ as a 5 base number...
My answer is $B=1,K=2,O=3$
$44=2+42$

Now we can verify our answer...

\[BOOK_{base 8}=BOOK_{base 7}+BOOK_{base 5}\]
\[1332_{base 8}=1332_{base 7}+1332_{base 5}\]

We convert them to base 10.
\[1332_{base 8}=730_{base 10}\]
\[1332_{base 7}+1332_{base 5}=513_{base 10}+217_{base 10}=730_{base 10}\]

So the answer is right. $O=6$ can't be an answer I think cause there is no such digit 6 in base 5... :D
Man himself is the master of his fate...

Post Reply