Advertisement

Free Online Binary Arithmetic Calculator

Add, subtract, multiply, and divide binary numbers.

Use only the digits 0 and 1. Operations treat the inputs as unsigned whole numbers and return an exact binary result. Division reports an integer quotient and a remainder.

Binary result
—
Exact base-2 result
Decimal
—
Base 10
Hexadecimal
—
Base 16
Octal
—
Base 8
Remainder
—
Only for division
Input lengths
—
Bits in A and B

Working

  1. Enter two binary numbers to see the conversion and result.
Advertisement

About the Binary Arithmetic Calculator

Binary is the base-2 number system used by every digital circuit and stored program. Each position represents a power of two, so the bits 1011 mean 8 + 0 + 2 + 1 = 11. This calculator performs addition, subtraction, multiplication and integer division on binary strings and shows the answer in binary, decimal, hexadecimal and octal. It uses exact integer arithmetic, so long bit patterns do not lose precision.

How the operations work

Binary addition follows the same carry rules as decimal, but only the digits 0 and 1 exist. 1 + 1 equals 10 in binary: write 0 and carry 1. Subtraction borrows 2 instead of 10. Multiplication is repeated shifted addition, and division finds how many times the divisor fits into the dividend, leaving a remainder. The calculator converts the operands to whole numbers internally, applies the operation, then converts the exact result back to each base. It does not truncate or round.

Reading the four bases

Binary is useful for understanding the machine; hexadecimal is a compact shorthand because one hex digit maps exactly to four bits; octal maps exactly to three bits and appears in older systems and file permissions; decimal is the human-readable value. Converting 101101 to decimal gives 45, to hex gives 2D, and to octal gives 55. When the result is negative, the calculator prefixes a minus sign and converts the magnitude. Division is integer division, so 45 ÷ 13 gives 3 with a remainder of 6.

Unsigned versus signed interpretation

This tool treats the inputs as unsigned magnitudes. Real hardware often uses fixed-width two's complement, where the most significant bit represents a negative place value. In an 8-bit register, 11111111 is −1, not 255. The same bit pattern can mean different things depending on the agreed width and signedness. If you are working with registers, masks or bitwise logic, decide on a width first and interpret the result accordingly. For plain arithmetic on positive integers, the unsigned interpretation here is the natural one.

Input limits and validation

The inputs must contain only 0 and 1, with at least one digit each. Spaces, prefixes such as 0b, commas and decimal points are rejected so that a typo cannot silently change the meaning. Long strings are supported and results scroll inside their cards. Division by zero is reported as undefined. Leading zeros are accepted and do not change the value, though the input-length card still counts them, which can be useful when checking a fixed-width representation.

Frequently asked questions

Why is the result of subtraction sometimes negative?

The calculator compares the decimal values of the two operands. If the first is smaller, the difference is negative and is shown with a minus sign. Hardware without signed representation would instead wrap around at a fixed bit width.

Does division round the result?

It performs integer division, discarding the fractional part, and reports the remainder separately. For example, 101101 ÷ 1101 is 11 with a remainder of 110 in binary. Use the remainder card to reconstruct the original value if needed.

Can I enter a binary fraction?

No. This tool works with whole binary numbers only. A binary point would introduce fractional powers of two and require a different result format, which is outside the scope of this calculator.

Sponsored
Find a bug? Report now