Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Decimal to binary, Decimal to Octal confusion!

  1. Sep 10, 2005 #1
    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: May 2, 2017
  2. jcsd
  3. Sep 11, 2005 #2
    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.

  4. Sep 11, 2005 #3
    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.

  5. Sep 11, 2005 #4
    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?
  6. Sep 11, 2005 #5

    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?)

  7. Sep 11, 2005 #6
    ohhh, instead of dividing by 2 or 8, it would be by 2^-1 then 2^-2? or 8^-1, etc>?
  8. Sep 11, 2005 #7
    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.

  9. Sep 14, 2005 #8
    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.
  10. Sep 14, 2005 #9

    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.

  11. Sep 14, 2005 #10
    oh hah, sorry my bad, i forgot about the whole 1/.5 = 2. And i'm in calc III, sad. hah
  12. Jan 28, 2010 #11
    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.
    Also, check this article on http://www.stringfunction.com/blog/convert-binary-and-decimal-values/" [Broken]
    Hope this help
    Last edited by a moderator: May 4, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook