Binary Calculator and Binary to Decimal Calculator
Our binary calculator adds, subtracts, multiplies and divides binary numbers, and it runs bitwise operations too. It also works as a binary to decimal calculator, with hex and octal on every answer. Type your numbers and see the result in four bases at once.
What Is a Binary Number?
Binary is the base 2 number system, which uses only the digits 0 and 1. Each position is worth a power of 2, starting with 1 at the right and doubling toward the left. Computers use it because a circuit can be either off or on.
The binary number 1101 means 8 + 4 + 0 + 1, which is 13 in decimal. Eight bits make a byte, and one byte holds values from 0 to 255. Longer strings work the same way, only with bigger powers.
How to Use the Binary Calculator
- Pick Calculate to work with two binary numbers, or Convert to change one number between bases.
- Enter Binary A and Binary B, then choose an operation.
- Read the answer in binary, decimal, hex and octal.
- Choose 8, 16, 32 or 64 bits to see the two's complement of a negative result.
Spaces and underscores are ignored, and a leading minus makes a number negative. Addition and subtraction also show the column layout, so you can follow the work. Division gives the quotient and the remainder together.
Binary Addition Calculator
Binary addition follows four rules. 0 + 0 is 0, 0 + 1 is 1, 1 + 1 is 10 and 1 + 1 + 1 is 11, where the left digit is a carry. Work from the right and carry into the next column. Subtraction borrows in the same way.
| Operation | Binary | Decimal |
| Add | 1010 + 0011 = 1101 | 10 + 3 = 13 |
| Subtract | 1010 − 0011 = 0111 | 10 − 3 = 7 |
| Multiply | 1010 × 0011 = 11110 | 10 × 3 = 30 |
| Divide | 1010 ÷ 0011 = 11 remainder 1 | 10 ÷ 3 = 3 remainder 1 |
Multiplication works like long multiplication in decimal, with shifts and additions. Division in the tool is whole number division. The remainder is shown separately.
Binary to Decimal Calculator
To convert by hand, write the place values under each digit and add the ones that sit under a 1. The number 101101 has place values 32, 16, 8, 4, 2 and 1. The 1s sit under 32, 8, 4 and 1, so the sum is 45. Choose Convert in the binary to decimal calculator to check any value.
The same tool shows 45 as 2D in hex and 55 in octal. It also converts the other way, so it doubles as a decimal to binary calculator. Enter 45 in decimal and the answer is 101101.
Bitwise Operations
| Operation | Rule | 1010 and 0011 give |
| AND | 1 only when both bits are 1 | 0010 |
| OR | 1 when either bit is 1 | 1011 |
| XOR | 1 when the bits differ | 1001 |
| Shift left | Doubles the value per step | 1010 << 1 = 10100 |
| Shift right | Halves the value per step | 1010 >> 1 = 101 |
Programmers use AND to mask bits, OR to set them and XOR to flip them. A shift left by one equals multiplying by 2. The calculator needs numbers that are not negative for these operations.
Negative Numbers and Two's Complement
Computers store negative whole numbers in two's complement. Invert every bit of the positive value, then add 1. In 8 bits, 10 is 00001010, so −10 is 11110110. The calculator shows this form whenever a result is negative.
The width matters because the same bit pattern means different numbers at different sizes. A value that does not fit the chosen width is reported as such. Pick 16, 32 or 64 bits to match your data type.
Hex and Octal Results
Hex is base 16 and uses the digits 0 to 9 and A to F. Each hex digit stands for exactly four bits, so 1111 is F and 1010 is A. Programmers use hex because it shortens long binary strings.
Octal is base 8, and each octal digit stands for three bits. The binary string 101101 splits into 101 and 101, which gives 55 in octal. The binary to decimal calculator shows both forms next to the decimal value.
Common Binary Mistakes
- Typing a digit other than 0 or 1 in a binary field.
- Forgetting the carry when two 1s meet in a column.
- Mixing up 8 bits and 16 bits when reading a negative value.
- Reading 1010 as one thousand and ten instead of ten.
The tool rejects a binary field with a wrong digit and says so. The aligned numbers make a misplaced digit easy to spot. If a result looks off, convert both inputs and check them in decimal first with the binary to decimal calculator.
Why Use Our Binary Calculator
It uses exact whole number math, so large values never lose a digit. Every answer appears in four bases at once. Enter your binary numbers and calculate now.
Frequently asked questions
Is this binary calculator free?
Yes, it is free with no sign up and runs in your browser.
Can the binary addition calculator handle negative results?
Yes, and a negative answer also shows its two's complement.
Can it work as a decimal to binary calculator?
Yes, choose Convert and set the value to decimal.
How large a number does it accept?
Inputs can have up to 300 digits, and results use exact whole number math.
What does the binary to decimal calculator do with spaces?
It ignores spaces and underscores, so grouped bits are fine.
How many bits are in a byte?
Eight bits make one byte.
Related calculators
Other tools people use alongside the binary calculator.