1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Binary to decimal.

  1. Oct 1, 2013 #1
    1. The problem statement, all variables and given/known data
    Not so much a problem as a general wondering. I know how to convert from decimal to binary and binary to decimal apart from when there's a recurring pattern involved. One which I really can't figure out it 0.1001 (repeating). How do you go about converting that to decimal?


    2. Relevant equations
    None really.


    3. The attempt at a solution
    I really don't have any attempt as I can't find much about it on the internet. It features in a worked example in our notes and it's never explained. The answer is 0.6 apparently. (Not sure if this would be considered a computing problem or a mathematical one)
     
  2. jcsd
  3. Oct 1, 2013 #2

    Mark44

    Staff: Mentor

    The trick here is similar to what you do to convert a repeating decimal fraction to a rational number. For example, if you need to convert .35353535... to a fraction, you multiply by a power of 10 large enough to move the part that repeats to the other side of the decimal point, which in this case would be 102. If we write x = .353535..., then 100x = 35.353535...

    Subtracting the equation with x from the equation with 100x, we get
    99x = 35 ==> x = 35/99

    For your binary fraction, write an equation x = .10011001...2. Get a new equation that you can subtract this one from by multiplying by 24 (or 16).
     
  4. Oct 1, 2013 #3
    Won't you then end up with 15x = 1001, and that equals 66.733... and not 3/5 as it says in my notes. Is there a mistake in the notes or am I misunderstanding you?
     
  5. Oct 1, 2013 #4

    Mark44

    Staff: Mentor

    No, you won't. In my work I was careful to note that the fraction was in base-2 (something you neglected to do). You should have gotten 15x = 10012.

    This is a bit ungainly, having a decimal number on one side, and a binary number on the other, but at least it's marked to indicate that different bases are being used.
     
  6. Oct 1, 2013 #5
    Got it! Thanks a million.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Binary to decimal.
  1. Decimals and surds (Replies: 8)

  2. Binary Relations (Replies: 25)

  3. Binary addition (Replies: 7)

Loading...