Binary Calculator

Binary arithmetic and base conversion — add, subtract, multiply and divide in binary, or convert between binary, decimal, hex and octal.

100% FreeNo sign-upPrivate — runs in your browser

Digits 0 and 1 only.

Show two's complement note
Explains how negative binary results relate to two's complement representation.
—

Result

—
Binary
—
Decimal
—
Hexadecimal
—
Octal
—
Division remainder
—
Working
—

Copied to clipboard

How to use this tool

1
Pick arithmetic or conversion

Arithmetic works on two binary numbers; conversion translates one number between bases.

2
Enter binary digits

Binary uses only 0 and 1 — anything else is refused with an explanation.

3
Read all four bases

Every result is shown in binary, decimal, hexadecimal and octal at once.

4
Check division remainders

Division shows the whole-number quotient plus the remainder in both bases.

Formula & worked example

Binary place values are powers of 2 (1, 2, 4, 8, 16…). Conversion: binary 1010 = 1×8 + 0×4 + 1×2 + 0×1 = 10. Arithmetic follows the same rules as decimal, in base 2.

1010₂ + 1100₂ = 10110₂ (10 + 12 = 22 in decimal). Converting 255 gives 11111111₂, FF₁₆ and 377₈.

Limitations — read this before you rely on it

Very large binary numbers lose precision in JavaScript beyond 53 bits — the calculator refuses numbers too large to convert exactly. Negative results are shown with a minus sign, not in two's complement, unless the note is switched on.

Frequently asked questions

The base-2 number system computers use: every digit is 0 or 1, and each place is worth twice the previous one.

Add the place values of the 1s: 1010 = 8 + 2 = 10.

Hex is a compact way to write binary — one hex digit stands for exactly four binary digits, which is why colours and memory addresses use it.

Binary division, like decimal division, does not always come out even: 13 ÷ 5 = 2 remainder 3.

Results can be negative (shown with a minus sign). For two's complement form, switch on the Advanced note.