PDF download Download Article PDF download Download Article

Binary division problems can be solved using long division, which is a useful method for teaching the process to yourself or writing a simple computer program. Alternatively, the complement method of repeated subtraction provides an approach you may not be familiar with, although it is not as commonly used in programming. [1] Machine languages generally use an estimation algorithm for greater efficiency, but these are not described here. [2]

Method 1
Method 1 of 2:

Using Long Division

PDF download Download Article
  1. Review decimal long division . If it's been a while since you did long division with ordinary decimal (base ten) numbers, review the basics using the problem 172 ÷ 4. Otherwise, skip ahead to the next step to learn the same process in binary. [3]
    • The dividend is divided by the divisor , and the answer is the quotient .
    • Compare the divisor to the first digit in the dividend. If the divisor is the larger number, keep adding digits to the dividend until the divisor is the smaller number. (For example, if calculating 172 ÷ 4, we would compare 4 and 1, note that 4 > 1, and compare 4 to 17 instead.)
    • Write the first digit of the quotient above the last dividend digit you were using in the comparison. Comparing 4 and 17, we see that 4 goes into 17 four times, so we write 4 as the first digit of our quotient, above the 7.
    • Multiply and subtract to find the remainder. Multiply the quotient digit with the divisor, in this case 4 x 4 = 16. Write the 16 underneath the 17, then subtract 17 - 16 to find the remainder, 1.
    • Repeat. Once again, we compare the divisor 4 with the next digit, 1, note that 4 > 1, and "bring down" the next digit of the dividend, to compare 4 with 12 instead. 4 goes into 12 three times with no remainder, so we write 3 as the next digit of the quotient. The answer is 43.
  2. Let's use the example 10101 ÷ 11. Write this as a long division problem, with the 10101 as the dividend and the 11 as the divisor. Leave space above to write the quotient, and below to write your calculations. [4]
    Advertisement
  3. This works just like a decimal long division problem, but it's actually quite a bit easier in binary. Either you can't divide the number by the divisor (0) or the divisor can go in one time (1): [5]
    • 11 > 1, so 11 can't "go into" 1. Write a 0 as the first digit of the quotient (above the first digit of the dividend).
  4. [6] Here are the next couple steps to our example:
    • Bring down the next digit of the dividend. 11 > 10. Write a 0 in the quotient.
    • Bring down the next digit. 11 < 101. Write a 1 in the quotient.
  5. As in decimal long division, we multiply the digit we just found (1) with the divisor (11), and write the result underneath our dividend aligned with the digit we just calculated. In binary, we can shortcut this, since 1 x the divisor always equals the divisor:
    • Write the divisor underneath the dividend. Here, we write 11 aligned underneath the first three digits (101) of the dividend.
    • Calculate 101 - 11 to get the remainder, 10. See how to subtract binary numbers if you need a review.
  6. Bring down the next digit of the divisor to the remainder to make 100. Since 11 < 100, write a 1 as the next digit of the quotient. Continue the problem as before:
    • Write 11 underneath the 100 and subtract to get 1.
    • Bring down the final digit of the dividend to make 11.
    • 11 = 11, so write a 1 as the final digit of the quotient (the answer).
    • There is no remainder, so the problem is complete. The answer is 00111 , or simply 111.
  7. Sometimes, the result is not an integer. If you still have a remainder after using the final digit, add a ".0" to the dividend and a "." to your quotient, so you can bring down another digit and continue. Repeat until you reach the desired specificity, then round the answer. On paper you can round down by chopping off the last 0, or if the last digit is a 1, drop it and add 1 to the new last digit. In programming, follow one of the standard algorithms for rounding to avoid errors when converting between binary and decimal numbers. [7]
    • Binary division problems often end up with repeating fractional portions, more often than they occur in decimal notation. [8]
    • This is referred to with the more general term "radix point," which applies in any base, since the "decimal point" is only used in the decimal system.
  8. Advertisement
Method 2
Method 2 of 2:

Using the Complement Method

PDF download Download Article
  1. One way to solve division problems – in any base – is to keep subtracting the divisor from the dividend, then the remainder, while tallying up the number of times you can do so before getting a negative number. Here's an example in base ten, solving the problem 26 ÷ 7: [9]
    • 26 - 7 = 19 (subtracted 1 time)
    • 19 - 7 = 12 ( 2 )
    • 12 - 7 = 5 ( 3 )
    • 5 - 7 = -2. Negative number, so back up. The answer is 3 with a remainder of 5. Note that this method does not calculate any non-integer portion of the answer.
  2. 2
    Learn to subtract by complements. While you can easily use the method above in binary, we can subtract by a more efficient method as well, which saves time when programming computers to divide binary numbers. This is the subtraction by complements method in binary . Here are the basics, calculating 111 - 011 (make sure both numbers are the same length): [10]
    • Find the ones' complement of the second term, subtracting each digit from 1. This is easily done in binary by switching each 1 to 0 and each 0 to 1. In our example, 011 becomes 100.
    • Add one to the result: 100 + 1 = 101. This is called the twos complement, and lets us perform subtraction as an addition problem. [11] Essentially, the result is as though we added a negative number instead of subtracting a positive one, once we finish the process.
    • Add the result to the first term. Write and solve the addition problem: 111 + 101 = 1100.
    • Discard the carry digit. Discard the first digit of your answer to get the final result. 1100 → 100 .
  3. 3
    Combine the two concepts above. Now you know the subtraction method of solving division problems, and the twos' complement method of solving subtraction problems. [12] You can combine this into one method for solving division problems, using the steps below. If you like, you can try to figure it yourself before you continue.
  4. Let's go through the problem 100011 ÷ 000101. The first step is solving 100011 - 000101, using the twos' complement method to turn it into an addition problem:
    • Twos' complement of 000101 = 111010 + 1 = 111011
    • 100011 + 111011 = 1011110
    • Discard carry bit → 011110
  5. In a computer program, this is the point where you increment the quotient by one. On paper, make a note somewhere in a corner where it won't get confused with your other work. We've successfully subtracted one time, so the quotient so far is 1 .
  6. The result of our last calculation is the remainder left over after the divisor "went in" once. Continue adding the twos' complement of the divisor each time and discarding the carry bit. Add one to the quotient each time, repeating until you get a remainder that's equal to or smaller than your divisor: [13]
    • 011110 + 111011 = 1011001 → 011001 (quotient 1+1=10 )
    • 011001 + 111011 = 1010100 → 010100 (quotient 10+1=11 )
    • 010100 + 111011 = 1001111 → 001111 ( 11+1=100 )
    • 001111 + 111011 = 1001010 → 001010 ( 100+1=101 )
    • 001010 + 111011 = 10000101 → 0000101 ( 101+1=110 )
    • 0000101 + 111011 = 1000000 → 000000 ( 110+1=111 )
    • 0 is smaller than 101, so we stop here. The quotient 111 is the answer to the division problem. The remainder is the final result of our subtraction problem, in this case 0 (no remainder).
  7. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Why is it important to study binary number systems, since they're rarely used nowadays?
    Community Answer
    They are used very frequently nowadays, actually. All digital appliances like computers, cell phones, smart TVs, etc. work internally by using the binary number system. A computer, for example, stores information only in the form of binary numbers. If you want to pursue a career in an IT field or the sciences, knowledge of the binary number system is essential.
  • Question
    How do I divide binary numbers?
    Community Answer
    Write the first digit of the quotient above the last dividend digit you were using in the comparison. Multiply and subtract to find the remainder.
  • Question
    Why there are only two numbers in binary number system?
    Donagan
    Top Answerer
    The binary system is a base-2 system, meaning it uses two numerals, 0 and 1. Our decimal system is base-10: it has ten numerals, 0 through 9.
See more answers
Ask a Question
      Advertisement

      Video

      Tips

      • The twos' complement method of subtraction will not work if your numbers have different numbers of digits. Add initial zeros to the smaller number to fix this.
      • Ignore the signed digit in signed binary numbers before calculating, except when determining whether the answer is positive or negative.
      • The instructions to increment, decrement, or pop the stack must be considered before applying any binary math to a machine instruction set.
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      Article Summary X

      To divide binary numbers, start by setting up the binary division problem in long division format. Next, compare the divisor to the first digit of the dividend. Tack on the next digit and repeat until you get a 1, then find the remainder. Bring down the next digit of the divisor and repeat the process until you've solved the problem! To learn how to divide binary numbers using the complement method, read on!

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 792,320 times.

      Reader Success Stories

      • Karunia Sentosa

        Jan 18, 2019

        "Now I know how to divide binary numbers. I was great at adding, subtracting and multiplying binary numbers, but not ..." more
      Share your story

      Did this article help you?

      Advertisement