Advertisement

Binary division calculator

Divide binary integers and get an exact integer quotient with remainder. Follow the long division steps without losing large input digits.

Calculator

Exact result in binary
100
Exact decimal result
4
Result stored in selected width
00000100
Stored unsigned decimal
4
Stored signed decimal
4
Exact result exceeds selected range
No
Binary remainder
1
Decimal remainder
1
Long division of magnitudes
PositionBefore subtractionQuotient bitRemainder
3101
21110
1000
0101

Advertisement

How this calculator works

Bring down one dividend bit at a time. If the running remainder reaches the divisor, write a quotient bit of 1 and subtract the divisor; otherwise write 0. The table uses magnitudes. Signed division truncates toward zero, and its remainder has the dividend's sign. Select unsigned or two's complement interpretation before entering patterns. Short inputs are padded with zeros to the selected width; signed negatives therefore need a leading 1 at that width. Overflow describes the exact mathematical answer, which is never silently discarded.

Formula

A = Bq + r. Unsigned division has 0 <= r < B. Signed q truncates A/B toward zero, with |r| < |B|.

Worked example

1101 divided by 11 is 100 remainder 1: 13 = 3 x 4 + 1. A second exact division is 1010 / 10 = 101.

Advertisement

Frequently asked questions

What does the selected width change?

It limits each operand and determines the stored result and signed interpretation. The exact answer is also displayed, even when it needs more bits.

How are negative inputs entered?

Choose two's complement and enter the complete negative pattern for the chosen width. For example, 11111111 is -1 in eight bits. A minus sign is only accepted in the exact sum field for missing-addend calculations.

Are long binary strings exact?

Yes. Operands are text strings and calculations use integer arithmetic with no rounding. Presets reach 64 bits and custom widths reach 256 bits.

What do the steps show?

The table follows the magnitude calculation described above. Read the exact result for its final sign; stored results wrap to the selected width.

Sources

Advertisement