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!

Binary long division

  1. Aug 26, 2011 #1
    1. The problem statement, all variables and given/known data

    I'm trying to divide 1010 by 1001

    2. Relevant equations



    3. The attempt at a solution

    So far all I have is

    _1___________
    1001 |1010.000000000
    1001
    ------
    0001


    I know that 1001 divides into 0001 0 times, but I don't know how to continue..
     
  2. jcsd
  3. Aug 26, 2011 #2

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Re: Binary long devision

    You do the same thing you do when you long-divide using decimals. Append that 0 to the quotient and then bring down the next digit from the dividend.
     
  4. Aug 26, 2011 #3
    Re: Binary long devision

    So for the next part of the quotient I divide 00010 (by bringing the 0 down) by 1001.
    Right?
     
  5. Aug 26, 2011 #4

    I like Serena

    User Avatar
    Homework Helper

    Re: Binary long devision

    Let's see.
    As you should be aware, this will take you into the decimals (binoms??!).

    Code (Text):

    1001/1010\1.
         1001
         ----
            1
    .......
     
     
  6. Aug 26, 2011 #5
    Re: Binary long devision

    So, divide 1.0 by 1001?
     
  7. Aug 26, 2011 #6

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Re: Binary long devision

    OK, so you had 1001 go into 1010 once, leaving a remainder of 1:
    Code (Text):
              1.
         +---------------
    1001 | 1010.000000000
           1001
           ----
              1
    Now you bring down the 0 from the dividend and tack it onto the remainder:
    Code (Text):
              1.
         +---------------
    1001 | 1010.000000000
           1001 |
           ---- v
              1.0
     
    1001 goes into 10 zero times (just ignore the binary point), so tack on a 0 to the quotient:
    Code (Text):
              1.0
         +---------------
    1001 | 1010.000000000
           1001
           ----
              1.0
     
    Then bring down another 0 and tack it onto the remainder:
    Code (Text):
              1.0
         +---------------
    1001 | 1010.000000000
           1001  |
           ----  v
              1.00
     
    Repeat. You should be able to see you're going to have to bring down two more 0's before anything new happens:
    Code (Text):
              1.000
         +---------------
    1001 | 1010.000000000
           1001    |
           ----    v
              1.0000
     
     
  8. Aug 26, 2011 #7

    I like Serena

    User Avatar
    Homework Helper

    Re: Binary long devision

    Hmm, no divide 1010 by 1001...
    The result is 1.0....

    Edit: as vela said! (Wow!!!)
     
  9. Aug 26, 2011 #8
    Re: Binary long devision

    Thank you both so much! :smile:
     
  10. Aug 26, 2011 #9

    Mark44

    Staff: Mentor

    Re: Binary long devision

    The key is that each step of the division will give you either 0 or 1. If the number you are currently dividing is less than the divisor (the number you are dividing by), you write down a 0 digit, and bring down another digit. If the number you are dividing is greater than or equal to the divisor, you write down a 1 digit, and subtract the divisor from the number you were dividing. Continue the process as long as necessary. This is just like normal long division.
     
  11. Aug 26, 2011 #10

    I like Serena

    User Avatar
    Homework Helper

    @Mark44: Congratulations! :smile:
    But don't you feel you lost something, now that it is no longer clear that you are a homework helper?
    (Please do not make me a mentor. I'm not ready for that yet! :wink:)
     
  12. Aug 26, 2011 #11

    Mark44

    Staff: Mentor

    Thanks! Yeah, I kind of miss the Recognitions panel, with its badges for contributor, HH, and Science Advisor that I had. Oh, well...
     
  13. Aug 26, 2011 #12
    I've gotten this

    ______1.000111____
    1001 | 1010.000000000000
    -------1001
    -------0001.0000
    ------------1001
    ------------1110
    --------------1001
    ----------------1110


    And it just stays going like this :confused:
     
  14. Aug 26, 2011 #13

    Mark44

    Staff: Mentor

    Yes, that's as it should be. If you use long division to divide 10 by 9, you get 1.1111111... The same kind of thing is happening when you divide the same numbers in binary form.

    Instead of 1.11111... (base-10), you're getting 1.000111 000111 ... (base-2).
     
  15. Aug 27, 2011 #14
    But if I stay going on I get 1.00011111111111111 on the quotient?
     
  16. Aug 27, 2011 #15

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Recheck your subtraction of 1110 and 1001.
     
  17. Aug 27, 2011 #16
    Ah I see my mistake! Thanks! :smile:
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Binary long division
  1. Modulo 2 long division (Replies: 1)

  2. Binary question (Replies: 2)

  3. Basic Binary (Replies: 1)

Loading...