How to Convert Decimal to Base 3

Data structures & algorithms topics
Post Reply
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

How to Convert Decimal to Base 3

Post by Nipuna » Thu Feb 03, 2011 2:10 pm

Hello Friends

I need Helps for BIT studying

I want to Convert Decimal to Base 3.

Please Tell me the way of doing it. BIT VLE Example is bit Unclear and Stuff in the Internet is Same also.

And i like if you Guys can help me Quickly because I need to Complete All these Topics and do All the Assignments before 11th of February.

I did Decimal to Binary when i did my O/L but now I can't remember them because of the non-using for Long Time. :)


Thanks
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Re: How to Convert Decimal to Base 3

Post by Nipuna » Thu Feb 03, 2011 4:35 pm

Hi Friends I finally Found Out

Here is the Site I used for it

http://www.tutorvista.com/math/base-10-to-base-3

But I can't understand the last 2 parts,

1/3 - 0

and

0/3 - 1

Why as that?

Please Tell me about those? I understand the Rest.
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: How to Convert Decimal to Base 3

Post by Neo » Thu Feb 03, 2011 6:56 pm

First of all be familiar with Q = Quotient, R = Reminder. Q is the full number we get after division whereas R is the remainder after division.

1 / 3 -> Q = 0, R = 1

So in a base conversion, we write it as,

1 / 3 = 0 (Q)
1 (R)

In base 3 conversion, if the Q is larger than 2, then we need to re-divide it until we get a number less than or equals 2.
Finally we have to write all Qs and Rs as in the following example of converting 29 to base 3.
1.PNG
1.PNG (2.67 KiB) Viewed 6364 times
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Re: How to Convert Decimal to Base 3

Post by Nipuna » Thu Feb 03, 2011 8:06 pm

Thanks Buddy Now I get It And Did some Exercises in BIT now i understand it

By The Way there is only 11 Days to Complete all the Assignments. And i did 2 and there are another 6 to do. Will I get time to do Complete these All ?



Thanks Friend.
Post Reply

Return to “Data Structures & Algorithms”