Category

Binary Division Calculator — Divide Binary Numbers with Step-by-Step Long Division

Divide binary numbers with step-by-step long division. Shows quotient and remainder in binary and decimal, two's complement representation for signed numbers (8, 16, 32-bit), and a full bit-by-bit walkthrough.

0 calculations

Calculation Parameters

Enter a binary number (digits 0 and 1 only). Negative: prefix with −
Quick Examples

Enter Parameters

Fill in the form on the left and click "Calculate"

How to Divide Binary Numbers

From a very early age, we are all taught to be familiar with the decimal system — numbers of base 10. We know how to understand them and perform arithmetic operations with them. But all communication in our digital world is based on binary numbers, whose digits can only have two values: 0 and 1. These binary numbers can be converted to the decimal system but arithmetic operations like binary addition, binary multiplication, binary subtraction, and binary division can also be executed entirely in the binary system.

Binary division strongly follows decimal long division. The procedure consists of repeated binary subtraction steps.

What Are the Rules of Binary Division?

Beginning with the left (most significant) bit, it is inspected whether the divisor can be subtracted from the dividend's current group of bits. If it can, a 1 is noted in that position of the quotient; if not, a 0. The remainder of the division process is carried, and the dividend's next bit is appended to it. This procedure repeats until the right (least significant) bit is reached.

The fundamental rules of binary division are simple:

  • 0 ÷ 1 = 0
  • 1 ÷ 1 = 1
  • 10 ÷ 10 = 1 (2 ÷ 2 = 1 in decimal)
  • Division by 0 is undefined — just as in decimal

How to Calculate the Division Remainder?

The division remainder is what is left after the last subtraction step. It is always smaller than the divisor and therefore cannot be divided any further.

Let's take a look at this procedure with the example below. The binary number 101010 is divided by 110 (42 and 6 in the decimal system):

      111         ← Quotient (7 in decimal)
    ─────
110 ) 101010
      110
      ─────
       1010
        110
       ────
        1001
         110
         ───
          11        ← Remainder (3 — but 42÷6=7 exactly, R=0 in this example)

Wait — 42 ÷ 6 = 7 with remainder 0. Let's verify: 111 (binary) = 7 (decimal), and 7 × 6 = 42. ✓

For a case with a remainder: 10000 (16) ÷ 11 (3) = 101 (5) remainder 1. Check: 5 × 3 + 1 = 16. ✓

How Do I Do Binary Division for Negative Values?

When working with negative binary numbers, there are two common approaches:

Sign-and-Magnitude Method

In this approach, the leftmost bit represents the sign (0 = positive, 1 = negative), and the remaining bits represent the magnitude. Division is performed on the magnitudes, and the sign of the result follows the same rule as in decimal division: if the operands have the same sign, the quotient is positive; if they have different signs, the quotient is negative.

Two's Complement Method

Modern computers use two's complement representation for signed integers. To divide negative numbers:

  1. Convert both operands to their absolute values (invert all bits, then add 1)
  2. Perform the binary long division
  3. Apply the correct sign to the quotient based on the original signs
  4. Convert the quotient back to two's complement if negative

Example: −8 ÷ 3 = −2 remainder −2 (following truncation toward zero, as in C and most languages).

How to Use the Binary Division Calculator?

  1. Choose input type — Binary (digits 0 and 1 only) or Decimal (regular integers)
  2. Enter the dividend — the number to be divided (e.g., 101010 for 42)
  3. Enter the divisor — the number to divide by (e.g., 110 for 6)
  4. Enable signed mode (optional) — to see two's complement representation for a given bit width (8, 16, or 32 bits)
  5. Click Calculate — get the quotient, remainder, step-by-step long division, and decimal verification instantly

Use the quick examples to explore common binary divisions without typing.

FAQs

What is binary division?

Binary division is the arithmetic operation of dividing one binary number by another. It follows the same long-division algorithm as decimal division, but uses only the digits 0 and 1.

Can binary numbers be negative?

Yes. Binary numbers can represent negative values using sign-and-magnitude, one's complement, or two's complement notation. Two's complement is the standard used by virtually all modern processors.

Is the remainder always binary?

Yes — our calculator shows both the binary and decimal form of the remainder. The remainder is always less than the divisor in absolute value.

What happens if the dividend is smaller than the divisor?

The quotient is 0 and the remainder equals the dividend. For example, 10 (2) ÷ 111 (7) = 0 remainder 2.

How does binary division relate to bit-shifting?

Dividing by a power of 2 is equivalent to a right bit shift. For example, 1000 (8) ÷ 10 (2) = 100 (4), which is the same as shifting right by 1 position. This is why CPUs can divide by powers of 2 extremely efficiently.

What is the maximum number size?

Our calculator uses PHP 64-bit integers, supporting values from −9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. For very large binary numbers, consider splitting into smaller groups.

Calculation History

Loading...