# Binary Calculator > Add, subtract, multiply and divide binary numbers with every carry and borrow shown, plus two’s complement, AND, OR, XOR, NOT and shifts, and answers in four bases. - Page: https://linguaholic.com/tools/binary-calculator/ - Type: free online tool (Converters & translators), no sign-up, runs in the browser - Publisher: Linguaholic (https://linguaholic.com/), made by Marcel Iseli - Last updated: October 3, 2026 - Open it pre-filled: https://linguaholic.com/tools/binary-calculator/?a=1011&op=add&b=110 - `a`: first number, written in the chosen base (binary by default); a leading minus is allowed (for example `1011`) - `op`: operation: add, sub, mul, div, and, or, xor, not, neg (two's complement), shl, shr (for example `add`) - `b`: second number (or the number of places for a shift), written in the chosen base; not used by not and neg (for example `110`) - `base`: base the numbers are written in: 2 (default), 8, 10 or 16 (also binary, octal, decimal, hex) (for example `2`) - `bits`: bit width for two's complement, NOT and overflow: 8 (default), 16, 32 or 64 (for example `8`) ## How to use the binary calculator This **binary calculator** adds, subtracts, multiplies and divides binary numbers, and it also does the bitwise operations AND, OR, XOR and NOT, two’s complement, and left and right shifts. Under every answer it shows the working step by step, the way you would write it on paper, so you can check homework or learn the method rather than just copy a result. 1. **Choose how you type the numbers.** Binary is the default. Switch to decimal, hex or octal and the numbers already in the boxes are converted for you, so nothing is lost. 2. **Type the first number, pick an operation, type the second.** Spaces and underscores are ignored (`1011 0110` is fine), a `0b` or `0x` prefix is accepted, and a minus sign makes a number negative. NOT and two’s complement use only the first number. 3. **Pick a bit width** of 8, 16, 32 or 64 bits. It decides how a negative answer is written in two’s complement, how many bits NOT flips, and whether an answer overflows. 4. **Read the answer** in binary, decimal, hexadecimal and octal, each with a Copy button, plus the exact bit pattern a register of your chosen width would hold. 5. **Follow the steps.** Addition shows the carry row, subtraction the borrows and the two’s complement method, multiplication the shifted rows, and division a long division table, with a decimal check at the end. The calculator works with whole numbers of any size. It uses exact integer arithmetic, so even a 64-bit number multiplied by itself comes out right to the last digit: 18446744073709551615 squared is 340282366920938463426481119284349108225. Everything runs in your browser and nothing you type is sent anywhere. ## Binary addition Binary addition works exactly like the column addition you learned at school, except that each column can only hold 0 or 1. As soon as a column adds up to 2, you write 0 and carry 1 to the next column, just as you carry at 10 in decimal. There are only four cases to remember: | Sum | Result in binary | Write | Carry | | --- | --- | --- | --- | | 0 + 0 | 0 | 0 | 0 | | 0 + 1 | 1 | 1 | 0 | | 1 + 1 | 10 | 0 | 1 | | 1 + 1 + 1 | 11 | 1 | 1 | ### Worked example: 1011 + 110 Line the numbers up on the right and add one column at a time, starting with the ones column. The carries are written above the next column: 1. Column 1: 1 + 0 = 1, so write 1. 2. Column 2: 1 + 1 = 10, so write 0 and carry 1. 3. Column 3: 0 + 1 + 1 = 10, so write 0 and carry 1. 4. Column 4: 1 + 0 + 1 = 10, so write 0 and carry 1. 5. The last carry has no column to go into, so it becomes a new 1 at the front. A run of 1s makes a chain of carries. Adding 1 to 1111 carries all the way along and gives `10000`: 15 + 1 = 16. That is why `1111…1` plus one is always a 1 followed by zeros. ### Overflow in binary addition On paper a sum can always grow by one digit. Inside a computer, numbers live in a fixed number of bits, and an answer that needs more bits than that **overflows**. With 8 bits, 11001000 (200) + 1100100 (100) should be 100101100 (300), which needs 9 bits. An 8-bit register keeps only the lowest 8 bits, `00101100`, and reads it as 44. The calculator always gives the true answer, and the “In 8 bits” box shows what the register would hold and says when an answer overflows. ## Frequently asked questions **How do you add binary numbers?** Add column by column from the right: 0 + 0 = 0, 0 + 1 = 1, 1 + 1 = 10 (write 0, carry 1) and 1 + 1 + 1 = 11 (write 1, carry 1). For example, 1011 + 110 = 10001, which is 11 + 6 = 17. The calculator draws the carry row and explains every column. **What is 1 + 1 in binary?** 1 + 1 = 10 in binary, which is two. You write 0 in that column and carry 1 to the next one. Three ones, 1 + 1 + 1, make 11 (three). **How do you subtract binary numbers?** Subtract column by column from the right. When you need 0 − 1, borrow from the next column to the left, which is worth 2 in this column, so 2 − 1 = 1. The calculator marks every borrow and also shows the two's complement method computers use. **How do you multiply binary numbers?** Use shift and add: for every 1 in the second number, write the first number shifted left by that position, write zeros for every 0, then add the rows. 1011 × 101 = 110111 (11 × 5 = 55). The calculator shows all the rows. **How do you divide binary numbers?** Use long division: bring down one bit at a time, and if the divisor fits, write 1 in the quotient and subtract; otherwise write 0. The calculator gives the quotient and the remainder, for example 11011 ÷ 101 = 101 remainder 10 (27 ÷ 5 = 5 remainder 2). **What is two's complement?** It is how computers store negative numbers in a fixed number of bits: flip every bit of the positive number and add 1. In 8 bits, −5 is 11111011. Pick 8, 16, 32 or 64 bits and the calculator shows any negative answer in two's complement. **What is overflow in binary?** Overflow happens when an answer needs more bits than the register has. 200 + 100 = 300 needs 9 bits, so an 8-bit register keeps only 00101100 (44). The calculator gives the true answer and warns when it overflows the bit width you chose. **What do AND, OR, XOR and NOT do?** They work bit by bit: AND gives 1 where both bits are 1, OR where either is 1, and XOR where they differ. NOT flips every bit (the one's complement). Shifts move all bits left, which doubles the number, or right, which halves it. **Can I enter decimal, hex or octal numbers?** Yes. Switch the input to decimal, hex or octal and the numbers you typed are converted automatically. Every answer is shown in binary, decimal, hex and octal, each with a copy button. **How large can the numbers be?** Any size. The calculator uses exact whole-number arithmetic, so 64-bit values and far larger numbers come out right to the last digit. Everything runs in your browser and nothing is uploaded. ## Related tools - [Binary Converter](https://linguaholic.com/tools/binary-converter/): Convert between binary, decimal, hexadecimal, and octal as you type — exact for numbers of any size — with two's complement for 8/16/32/64 bits, bit and byte counts, step-by-step working, and a live binary clock. - [Binary Translator](https://linguaholic.com/tools/binary-translator/): Translate text to binary and binary code back to text — auto-detects what you paste, works with every language and emoji (UTF-8), shows each character's code, decimal, hex and binary, and includes a full binary alphabet chart. - [Binary Game](https://linguaholic.com/games/binary-game/): Learn binary by playing: flip bit cards to make a number, read and write binary, race a 60-second challenge and build streaks, across five levels from 4 to 8 bits. - [Hex to Text](https://linguaholic.com/tools/hex-to-text/): Decode hex to text and convert text to hex, with auto-detect, UTF-8, ASCII or Latin-1, any hex format, invalid bytes highlighted and every byte in decimal and binary. - [Roman Numeral Converter](https://linguaholic.com/tools/roman-numeral-converter/): Convert numbers to Roman numerals and back in one box, write big numbers with the bar on top, turn any date into Roman numerals for a tattoo, add and multiply Roman numerals, and practice with a quick quiz — plus a full chart. - [Morse Code Translator](https://linguaholic.com/tools/morse-code-translator/): Translate text to Morse code and decode it back, hear it as adjustable-speed sound with a visual flasher, and read the full Morse alphabet, number, and punctuation chart.