#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
⚡ FREE · ANY LENGTH

Binary Calculator: Binary Arithmetic with the Working Shown

Do binary maths of any size and see the result in binary, decimal, hex and octal.

  • ➕ Add with carries shown
  • ✖️ Multiply and divide
  • 🔁 AND, OR, XOR, shifts

How to use the Binary Calculator

  1. 1. Enter two binary numbersUse 0 and 1 only; a minus sign or 0b prefix is fine.
  2. 2. Pick the operationArithmetic, logic or shifts.
  3. 3. Read the resultBinary, decimal, hex and octal, with the column working for addition.

How binary arithmetic works

Binary uses only 0 and 1, and each column is worth double the one to its right: 1, 2, 4, 8, 16 and so on. The rules are short:

  • Addition: 0+0 = 0, 0+1 = 1, 1+1 = 10 (write 0, carry 1), and 1+1+1 = 11 (write 1, carry 1).
  • Subtraction: borrow from the next column, just like in decimal. Computers actually add the two's complement instead.
  • Multiplication: shift and add. For each 1 in the multiplier, add a shifted copy of the other number.
  • Division: long division, giving a whole-number quotient and a remainder.

Shifting left by one place doubles a number; shifting right halves it, dropping the remainder. Numbers of any length are handled exactly using JavaScript's BigInt, so even 200-bit values come out right.

Worked example

1011 + 0110: in decimal that's 11 + 6. Working from the right: 1+0 = 1; 1+1 = 0 carry 1; 0+1+1 = 0 carry 1; 1+0+1 = 0 carry 1; and the final carry gives a new leading 1. The answer is 10001, which is 17 in decimal, 11 in hex and 21 in octal. The tool lays out the carry row above the sum just as you'd write it on paper.

More to try:

  • 1101 × 101 = 1000001 (13 × 5 = 65).
  • 11001 ÷ 100 = 110 remainder 1 (25 ÷ 4 = 6 remainder 1).
  • 1100 XOR 1010 = 0110.

For fixed-width signed values with two's complement, such as what an 8-bit byte holds, use the Bitwise Operations Calculator.

Frequently asked questions

How are negative answers shown?

With a minus sign, like -101. For a negative result of subtraction, the tool also shows the 8-bit two's complement form.

Is there a size limit?

No practical one. BigInt keeps every digit exact.

Can I convert binary to decimal only?

Yes, the decimal value is shown for every result. The Number System Converter does plain conversions.

Is the binary calculator free to use?

Yes, the binary calculator is free and costs nothing. Your first calculation shows a short form for your name and WhatsApp number one time; once that's done, this tool and every other Uncodemy tool open with no form.

More free tools

See all free tools