Free binary calculator: add, subtract, multiply and divide binary numbers with exact big-integer arithmetic, decimal and hex conversions and remainders.
Binary Calculator
Add, subtract, multiply and divide binary numbers exactly — with decimal and hex cross-checks and division remainders shown.
Enter your values
Fill in the fields below — the result appears with every step shown.
Your result will appear here
Enter your values above, then press Calculate — or press Enter in any field.TinyExe · Binary Result
Calculated locally in your browser
—
Name
—
First binary number
—
Operation
—
Second binary number
—
How this was calculated
What to do next
TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.
Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.
The short answer
To calculate in binary, convert each binary operand to decimal by place value, apply the operation, and convert the result back to binary. For example, 1010 plus 101 equals 1111 in binary, because 1010 is 10 in decimal, 101 is 5, and 10 plus 5 is 15, which is written 1111 in binary.
- 1010₂ = 10₁₀ and 101₂ = 5₁₀, so 1010 + 101 = 1111₂ = 15₁₀
- Each hex digit equals exactly 4 binary bits
- Binary division here is integer division with the remainder shown
Powers of two and common bit patterns
Reference values for this calculator.
| Binary | Decimal | Hex |
|---|---|---|
| 1 | 1 | 0x1 |
| 1010 | 10 | 0xA |
| 11111111 | 255 | 0xFF |
| 100000000 | 256 | 0x100 |
| 1111111111111111 | 65,535 | 0xFFFF |
| 1000000000000000000000000 | 16,777,216 | 0x1000000 |
The formula
The exact formula this calculator uses — every variable in it is explained in the card below.
The formula
Enhancement over a plain converter: all four operations with exact big-integer arithmetic (no floating-point rounding on long bit strings), plus the decimal value of each operand, the hexadecimal result, and division remainders — the checks a student or embedded developer actually needs.
Worked examples
Worked examples with the full working shown — try them in the calculator to check.
Example 1
Binary addition
1010 + 101
| Calculation | Steps |
|---|---|
| 1010₂ = 8 + 2 = 10. 101₂ = 4 + 1 = 5. 10 + 5 = 15. 15 in binary = 1111. | 1010 + 101 = 1111₂ (15 in decimal, 0xF). |
Result
Example 2
Binary subtraction
1111 − 1010
| Calculation | Steps |
|---|---|
| 1111₂ = 15. 1010₂ = 10. 15 − 10 = 5. 5 in binary = 101. | 1111 − 1010 = 101₂ (5 in decimal). |
Result
Example 3
Binary multiplication and division
101 × 11, then 1010 ÷ 10
| Calculation | Steps |
|---|---|
| 101₂ = 5, 11₂ = 3, 5 × 3 = 15 = 1111₂. For division: 1010₂ = 10, 10₂ = 2, 10 ÷ 2 = 5 = 101₂ with no remainder. | 101 × 11 = 1111₂; 1010 ÷ 10 = 101₂ exactly. |
Result
How to use this calculator
Step 1
Type the first binary number (0s and 1s only) in the first field.
Step 2
Choose add, subtract, multiply or divide.
Step 3
Type the second binary number.
Step 4
Read the binary result as the headline answer.
Step 5
Use the decimal and hex details to cross-check the result against ordinary arithmetic.
Frequently asked questions
How is a binary number converted to decimal?
Read the bits as powers of two from the right: the rightmost bit is worth 1, then 2, 4, 8 and so on. 1010 = 8 + 0 + 2 + 0 = 10. This calculator shows each operand's decimal value with the result.
How do you add binary numbers by hand?
Column by column from the right, like decimal addition but carrying at 2 instead of 10: 0+0=0, 0+1=1, 1+1=0 carry 1, 1+1+1=1 carry 1. So 1010 + 0101 = 1111 (10 + 5 = 15).
Does division give a remainder?
Yes. Division here is integer division: 1010₂ (10) ÷ 11₂ (3) gives quotient 11₂ (3) with remainder 1₂ (1), shown in the verdict. Fractions of a bit are not produced; use decimal division if you need them.
Can it handle very long binary numbers?
Yes — the arithmetic is done with big integers, so 64-bit and longer bit strings stay exact instead of being rounded by floating point. Only the decimal display converts through ordinary numbers, and the binary and hex results remain exact at any length.
Why can't I subtract a larger number from a smaller one?
This calculator works with unsigned binary, the form used for raw bit patterns, where negative results do not exist. Signed values on real hardware use two's complement, which is a different representation; swap the operands to see the magnitude of the difference.
What is the hex detail for?
Hexadecimal is the compact way engineers read binary: each hex digit is exactly 4 bits, so 11111111₂ = 0xFF. Showing the hex result lets you check register values, colour codes and memory dumps quickly.
About this calculator
A binary calculator performs arithmetic directly on base-2 numbers — the strings of 0s and 1s that computers actually store — and reports the result in binary, decimal and hexadecimal at once. This one adds, subtracts, multiplies and divides with exact big-integer arithmetic, so long bit patterns never lose precision.
Every binary digit (bit) carries a place value that is a power of two: reading 1010 from the right gives 0×1 + 1×2 + 0×4 + 1×8 = 10. Arithmetic follows exactly the same rules as decimal — the only difference is that you carry at 2 instead of 10, which is why 1 + 1 = 10 in binary (write 0, carry 1).
Doing this by hand is slow and error-prone past a few bits, and ordinary calculators quietly switch to floating point, which cannot represent integers exactly beyond 2^53. This tool keeps the whole computation in big integers, so a 40-bit addition is as exact as a 4-bit one, and the decimal and hex readouts let you cross-check the binary answer against bases you read fluently.
Division deserves a note: hardware integer division produces a quotient and a remainder, and so does this calculator. 1010₂ ÷ 11₂ is 11₂ remainder 1₂ — exactly like 10 ÷ 3 = 3 remainder 1 in decimal. If you expected a fraction, you want decimal division of the converted values instead.
Use it for computing coursework on number bases, checking register and bitmask arithmetic while programming, verifying subnetting or embedded-systems examples by hand, and any time a "binary translator" search really means "do this sum in binary and prove it in decimal".
How to calculate it yourself
Step 1
Convert each binary operand to decimal by summing bit × 2^position.
Step 2
Perform the operation in decimal (or work in binary, carrying at 2).
Step 3
For division, keep the integer quotient and record the remainder separately.
Step 4
Convert the result back to binary by repeatedly dividing by 2 and reading remainders upward.
Step 5
Optionally group the binary result in 4s to read off the hexadecimal value.
Real-life examples
Checking a bitmask in code review
A firmware developer sets flags with the mask 1010 and an offset pattern 0101, and wants to confirm the combined value before flashing the device.
Combined by addition here as a magnitude check: 1010₂ = 10, 0101₂ = 5, sum 15 = 1111₂ = 0xF — all four low bits set, which matches the intended register state.
The mask pair covers bits 0–3 fully (1111₂), so the review can proceed.
Student verifying homework before submission
A computing student must show 1111 − 1010 and 101 × 11 by hand and wants an independent check that is not a plain decimal calculator.
1111₂ − 1010₂: 15 − 10 = 5 = 101₂. 101₂ × 11₂: 5 × 3 = 15 = 1111₂. Both match the hand working column for column.
Answers confirmed: 101₂ and 1111₂, with decimal proofs 5 and 15 to cite in the working.
Ideas & use cases
- Cross-check subnetting practice: add the binary of two host counts and verify against decimal before converting a mask.
- Use the hex readout to verify colour or register values: type the binary, read 0x… directly.
- Test big values: paste a 64-bit pattern to show why floating-point calculators disagree while big-integer arithmetic does not.
Limitations & sources
- Unsigned integers only: no fractional binary points, no negative (two's complement) inputs, and division returns an integer quotient plus remainder rather than a fractional binary result.
Sources: Standard base-2 arithmetic and two's-complement background: NIST Digital Library / common computer-architecture references (e.g. Patterson & Hennessy, Computer Organization and Design)
