Binary Arithmetic Tool

Binary Modulo Calculator

Calculate the remainder of binary division instantly with BinaryCon’s Binary Modulo Calculator. Enter a binary dividend and modulus to get the exact binary remainder, quotient, decimal verification, and a clear division check.

✓ Exact Binary Remainder ✓ Binary Quotient ✓ Decimal Check ✓ Long Binary Support ✓ Free Unlimited Use
MOD
Binary Modulo
● Ready
Enter non-negative binary integers using only 0 and 1. The modulus cannot be zero.
Try:
✓ Binary Remainder
Binary modulo result
Binary Quotient 0
Remainder Bits 0
Decimal Remainder 0
Modulo Verification

What Is Binary Modulo?

Binary modulo calculates the remainder left after dividing one binary integer by another. The operation is usually written using mod or the percent symbol %.

The underlying arithmetic is the same as decimal modulo; only the number representation is different.

Example: 110110₂ mod 101₂ Convert mentally to decimal: 54 mod 5 = 4 Binary 4 is: 100₂ Therefore: 110110₂ mod 101₂ = 100₂

Binary Modulo Formula

Modulo is directly related to integer division. For dividend A and divisor B:

A = (B × Q) + R where: Q = integer quotient R = remainder Therefore: A mod B = R

For a positive divisor, the remainder is always smaller than the divisor.

How to Calculate Binary Modulo

1. Identify the dividend

The dividend is the binary number being divided.

2. Identify the modulus

The second binary value acts as the divisor.

3. Perform integer division

Find how many whole times the divisor fits into the dividend.

4. Multiply back

Multiply the binary quotient by the divisor.

5. Subtract

Subtract that product from the original dividend.

6. Read the remainder

The leftover binary value is the modulo result.

Example: 110110 mod 101

Let’s calculate the modulo of binary 110110 by binary 101.

Division: 110110₂ ÷ 101₂ = 1010₂ remainder 100₂ Therefore: 110110₂ mod 101₂ = 100₂ Verification: 101₂ × 1010₂ = 110010₂ 110010₂ + 100₂ = 110110₂

Example: 1010 mod 11

1010₂ = 10₁₀ 11₂ = 3₁₀ 10 mod 3 = 1 Therefore: 1010₂ mod 11₂ = 1₂

When Is Binary Modulo Equal to Zero?

The modulo result is zero when the dividend is exactly divisible by the modulus.

Example: 1111₂ mod 11₂ Since: 1111₂ = 15₁₀ 11₂ = 3₁₀ 15 mod 3 = 0 the result is: 0₂

What If the Dividend Is Smaller Than the Modulus?

If a non-negative dividend is smaller than the positive modulus, the divisor does not fit even once. The quotient is zero and the original dividend becomes the remainder.

101₂ mod 1000₂ Since: 101₂ < 1000₂ the result is: 101₂

Binary Modulo by 1

Every non-negative integer modulo 1 is zero because every integer is exactly divisible by 1.

101101₂ mod 1₂ = 0 111111₂ mod 1₂ = 0

Why Is Modulo by Zero Invalid?

Modulo depends on division. Since division by zero is undefined, modulo zero is also undefined.

Important: this calculator rejects a modulus of binary 0.

Binary Modulo and Powers of Two

For non-negative binary integers, modulo by a power of two has a useful bit-level interpretation.

If the modulus is 2^n, the remainder is determined by the lowest n binary bits.

Modulus Decimal Relevant Low Bits
10₂ 2 Lowest 1 bit
100₂ 4 Lowest 2 bits
1000₂ 8 Lowest 3 bits
10000₂ 16 Lowest 4 bits

Example: Modulo by Binary 1000

Binary 1000 equals decimal 8. For a non-negative integer, modulo 8 is represented by the lowest three bits.

Example: 11010110₂ mod 1000₂ Lowest three bits: 110 Therefore: 11010110₂ mod 1000₂ = 110₂ Decimal check: 214 mod 8 = 6 110₂ = 6₁₀

Binary Modulo vs Binary Division

Operation Main Result Example
Binary Division Quotient and remainder 1010 ÷ 11 = 11 remainder 1
Binary Modulo Remainder only 1010 mod 11 = 1

The modulo operation simply takes the remainder portion of integer division.

Binary Modulo in Programming

Modulo is frequently used in programming for cyclic counters, indexing, divisibility tests, parity checks, wrapping values, hashing-related operations, and extracting ranges when the divisor has useful mathematical properties.

Although programming languages often display operands in decimal, hexadecimal, or another notation, the processor ultimately operates on binary data.

Binary Modulo and Even or Odd Numbers

Modulo 2 is a simple way to test whether a non-negative integer is even or odd. Binary makes this particularly easy because the least significant bit already contains the answer.

If: A mod 10₂ = 0 then A is even. If: A mod 10₂ = 1 then A is odd.

Equivalently, an unsigned binary integer ending in 0 is even, while one ending in 1 is odd.

Can Long Binary Values Be Used?

Yes. The main modulo calculation works directly with binary strings rather than first converting the complete inputs into ordinary JavaScript numbers.

The routine performs binary long division internally and keeps the remaining value after each step.

Important: this calculator handles non-negative integer modulo. Signed modulo behavior can differ between programming languages, especially when negative operands are involved.

Binary Modulo Examples

Dividend Modulus Binary Result
1 1 0
101 10 1
1000 10 0
1010 11 1
1111 11 0
110110 101 100
11010110 1000 110

Common Binary Modulo Mistakes

Returning the quotient

Modulo returns the remainder, not the quotient.

Using modulus zero

Modulo zero is undefined because division by zero is undefined.

Using invalid binary digits

A valid binary operand can contain only 0 and 1.

Ignoring signed behavior

Modulo with negative operands may follow different conventions across programming languages.

Related BinaryCon Tools

Binary Modulo Calculator FAQs

What is binary modulo?
Binary modulo is the remainder left after dividing one binary integer by another.
What is the difference between binary division and binary modulo?
Binary division primarily calculates the quotient, while modulo returns the remainder from that division.
What is 101 mod 10 in binary?
101₂ mod 10₂ = 1₂. Decimal 5 divided by 2 leaves remainder 1.
What is 1010 mod 11 in binary?
The result is 1₂ because decimal 10 divided by 3 leaves remainder 1.
What is 1111 mod 11 in binary?
The result is 0 because 15 is exactly divisible by 3.
What is 110110 mod 101 in binary?
The result is 100₂, equivalent to decimal remainder 4.
Can binary modulo have a result larger than the modulus?
No. For the non-negative integer calculation used here, the remainder is always smaller than the positive modulus.
What happens if the dividend is smaller than the modulus?
The dividend itself becomes the remainder because the divisor fits zero whole times.
What is any binary number modulo 1?
The result is always zero.
Can I calculate binary modulo zero?
No. Modulo zero is undefined.
How does modulo 2 work in binary?
Modulo 2 depends only on the least significant bit. A final bit of 0 gives remainder 0, while a final bit of 1 gives remainder 1.
Can this calculator handle long binary integers?
Yes. The core calculation works directly on binary strings instead of depending on ordinary floating-point integer precision.
Does this calculator support negative binary values?
No. This page is intended for non-negative binary integers. Signed modulo can require additional rules depending on the representation or programming language.
Does BinaryCon require registration?
No. The Binary Modulo Calculator can be used directly without signup.
Scroll to Top