# Decimal to binary, Decimal to Octal confusion!

## Main Question or Discussion Point

Hello everyone, I realize this is really basic stuff and mainly pointless considering calculators can do it for you but i'm still wondering on why this isn't working out right. I'm in a digital design class and he showed us a method for converting decimal to binary and it seemed easy and seemed to work great but he would use numbers such as: 25 and nothing that had a decimal point. Well the number is 369.3125 decimal. To convert to binary it worked fine for the whole number 369 by just divding by the desired base, so since i wanted binary, i would divide by 2 and the remainder of each would be the number in binary. Also if I wanted to convert decimal to octal, i could just keep on divding by 8, and so on. But as you can see I can't figure it out how you figure out the .3125 of the number by using the divding method? Also I'm having troubles converting it to octal using the dividing method. Here is my work in the picture. Any help would be great!
http://img139.imageshack.us/img139/7369/fff7vh.jpg [Broken]

Last edited by a moderator:

Related Electrical Engineering News on Phys.org
I'll give you a couple of hints. First, convert that to the left and that to the right separately. Second, where the left values (starting at the point) of binary numbers represent values of 1(ie 2^0), 2, 4, 8,.....etc., those to the right represent values of 1/2 (ie, 2^-1), 1/4, 1/8,...etc.

KM

Same consideration for Octal, except the values to the left (starting at the point), are n*8, n*64, n*512,...etc., those to the right are n*1/8, n*1/64...etc. Operate on them accordingly.

KM

Thanks for the reply, well I know how to convert using that method, but I think it takes longer to do, is that the only way you can find the numbers after the decimal point? You can't use the dividing by power rule?

mr_coffee said:
Thanks for the reply, well I know how to convert using that method, but I think it takes longer to do, is that the only way you can find the numbers after the decimal point? You can't use the dividing by power rule?

Sure you can. I thought what I told you would give you the answer. Hint: instead of repetitively dividing by two or eight, you divide repetitively by ?? or ??. (and what should that imply?)

KM

ohhh, instead of dividing by 2 or 8, it would be by 2^-1 then 2^-2? or 8^-1, etc>?

mr_coffee said:
ohhh, instead of dividing by 2 or 8, it would be by 2^-1 then 2^-2? or 8^-1, etc>?
Yes, and what are those values, and what does the use of those values imply? You can check it on your example, because it is a very simple case.

KM

actually, I found a much easier way, you don't divide by anything, if you want to convert a decimal base 10, to a binary, just multiply by 2, and keep doing it, if u want octal, multiply by 8, its simple. THanks for the help though.

mr_coffee said:
actually, I found a much easier way, you don't divide by anything, if you want to convert a decimal base 10, to a binary, just multiply by 2, and keep doing it, if u want octal, multiply by 8, its simple. THanks for the help though.

What do you think I was trying to hint to you. Dividing by 1/2 is the same as multiplying by 2. The same with 1/8 and 8, or any other base. Then whatever carries each time to the "left" of the point is the value you use.

KM

oh hah, sorry my bad, i forgot about the whole 1/.5 = 2. And i'm in calc III, sad. hah

I know this is an old post, but for some of you still reading this, you can use this http://www.stringfunction.com/decimal-binary.html" [Broken] to make sure you are converting the right way.