1. Limited time only! Sign up for a free 30min personal 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!

Decimal to Binary

  1. Jul 22, 2004 #1
    hi!

    does anybody know how to convert a fraction(deciaml) to Binary?

    for example how can we convert 0.16 to Binary?

    thx for helping
     
  2. jcsd
  3. Jul 22, 2004 #2

    AKG

    User Avatar
    Science Advisor
    Homework Helper

    In a similar way you'd do for numbers > 0.

    If we have 200, we can start by finding the largest power of 2 less than or equal to 200, namley 128, and we have 72 remaining. The largest power of 2 less than or equal to 72 is 64, with 8 remaining. The largest power of 2 less than or equal to 8 is 8, with zero remaining. With zero remaining, we stop. So, we have
    1x128 + 1x64 + 0x32 + 0x16 + 1x8 + 0x4 + 0x2 + 0x1. In binary:
    11001000.

    Do the same for 0.16. The greatest power of 2 less than 0.16 is [itex]2^{-3} = 1/8 = 0.125[/itex]. This leaves 0.035 remaining. You might find yourself with a non-terminating binary representation. To start, you'll have 0.001... (I haven't figured out what will replace the "...", that's your job ;)).
     
  4. Jul 22, 2004 #3
    ok,i got it ! thx
     
  5. Jul 22, 2004 #4
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Decimal to Binary
  1. Decimal approximations (Replies: 3)

  2. Decimal places (Replies: 4)

  3. Decimal to odds (Replies: 4)

  4. Decimal Expansion (Replies: 2)

Loading...