Use these calculators to add, subtract, multiply, or divide binary numbers, to convert a binary value to decimal, and to convert a decimal value to binary.
Enter two binary numbers (digits 0 and 1 only) and choose an operation.
Enter a binary number to convert it to its decimal (base-10) equivalent.
Enter a decimal (base-10) number to convert it to binary.
The binary calculator is a complete tool for working with binary numbers. It performs the four basic arithmetic operations - addition, subtraction, multiplication, and division - directly on binary values, and it converts numbers back and forth between binary (base-2) and decimal (base-10). Binary is the language of computers, where every piece of data and every instruction is ultimately represented as a string of ones and zeros, so understanding how to read, convert, and compute in binary is fundamental to computer science, digital electronics, and programming.
Enter your values in the calculators above to get instant, exact results, including the decimal equivalents so you can check the math. The tool supports large numbers (up to 64 binary digits) using exact integer arithmetic, so results are precise even for very large values.
The binary number system is a base-2 positional numeral system that uses only two digits: 0 and 1. This is in contrast to the decimal system we use every day, which is base-10 and uses ten digits (0 through 9). Each digit in a binary number is called a bit (short for "binary digit"), and each position represents a power of 2, just as each position in a decimal number represents a power of 10.
Binary is the foundation of all modern computing because digital electronic devices have two stable states - on and off, or high and low voltage - which map naturally onto the two binary digits 1 and 0. Every number, letter, image, sound, and program inside a computer is ultimately stored and processed as binary.
In a binary number, the rightmost digit represents 20 (which equals 1), the next digit to the left represents 21 (2), then 22 (4), 23 (8), and so on, doubling with each position. To find the decimal value of a binary number, multiply each bit by its place value and add the results.
10101010 = 128 + 0 + 32 + 0 + 8 + 0 + 2 + 0 = 170
Reading from left to right, the bits are in the 128, 64, 32, 16, 8, 4, 2, and 1 positions. The 1s appear in the 128, 32, 8, and 2 positions, so the value is 128 + 32 + 8 + 2 = 170.
To convert a binary number to decimal, write out the place value (a power of two) for each bit, multiply each bit by its place value, and sum the products. The binary-to-decimal calculator above does this instantly. For example, the binary number 11001100 converts to decimal as 128 + 64 + 0 + 0 + 8 + 4 + 0 + 0 = 204.
To convert a decimal number to binary by hand, repeatedly divide the number by 2 and record the remainders, then read the remainders from bottom to top. For example, converting 170 to binary:
170 ÷ 2 = 85 r 0
85 ÷ 2 = 42 r 1
42 ÷ 2 = 21 r 0
21 ÷ 2 = 10 r 1
10 ÷ 2 = 5 r 0
5 ÷ 2 = 2 r 1
2 ÷ 2 = 1 r 0
1 ÷ 2 = 0 r 1
Reading the remainders from bottom to top gives 10101010, which is 170 in binary. The decimal-to-binary calculator above performs this conversion automatically.
Binary addition follows the same column-by-column process as decimal addition, but with only two digits. The rules are simple: 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, and 1 + 1 = 10 (which is 0 carry 1). Whenever a column sums to 2, you write 0 and carry 1 to the next column - just like carrying a 10 in decimal.
10101010 (170)
+ 11001100 (204)
= 101110110 (374)
The calculator handles all the carrying for you and shows both the binary result and its decimal equivalent so you can verify the answer.
Binary subtraction also mirrors decimal subtraction, using borrowing when needed. The rules are: 0 − 0 = 0, 1 − 0 = 1, 1 − 1 = 0, and 0 − 1 = 1 with a borrow from the next column. Computers typically implement subtraction using a method called two's complement, which lets them subtract by adding the negative of a number, simplifying the hardware. When the result is negative (the second number is larger than the first), the calculator displays the result with a minus sign.
Binary multiplication is actually simpler than decimal multiplication because each digit is either 0 or 1. You multiply the first number by each bit of the second number (shifting left for each position, exactly like long multiplication in decimal) and add the partial products. Because multiplying by 0 gives 0 and multiplying by 1 gives the number itself, each partial product is either zero or a shifted copy of the first number.
10101010 (170) × 11001100 (204) = 1000011101111000 (34,680)
Binary division uses long division, just like decimal division, repeatedly subtracting the divisor and bringing down digits. The calculator reports both the quotient and the remainder. For example, dividing 10101010 (170) by 11001100 (204) gives a quotient of 0 with a remainder of 10101010 (170), because 204 is larger than 170 and does not divide into it even once.
Computers represent negative numbers using a system called two's complement. In an 8-bit system, for example, positive numbers run from 0 to 127, and negative numbers are represented by taking the binary form of the positive number, inverting all the bits, and adding 1. Two's complement is elegant because addition and subtraction work the same way regardless of sign, which is why processors use it almost universally. This calculator displays subtraction results that are negative with a conventional minus sign for clarity rather than in two's complement form.
While binary is how computers store data, it is cumbersome for humans to read because the strings get long quickly. Programmers often use hexadecimal (base-16) as a compact shorthand, since each hex digit represents exactly four binary bits. Decimal remains the system people use for everyday counting. Converting between these systems is a core skill, and the binary-to-decimal and decimal-to-binary tools above handle the two most common conversions. The table below shows how the first several numbers look in each base.
| Decimal | Binary | Hexadecimal |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 1 | 1 |
| 2 | 10 | 2 |
| 4 | 100 | 4 |
| 8 | 1000 | 8 |
| 10 | 1010 | A |
| 16 | 10000 | 10 |
| 170 | 10101010 | AA |
A binary number is a number written in the base-2 system, using only the digits 0 and 1. Each position represents a power of two, and binary is the fundamental way computers store and process all data.
Multiply each bit by its place value (a power of two, starting from 1 on the right) and add the results. For example, 1010 = 8 + 0 + 2 + 0 = 10. The binary-to-decimal calculator above does this instantly.
Repeatedly divide the number by 2, recording the remainder each time, then read the remainders from bottom to top. The decimal-to-binary calculator above automates this process.
Digital electronic components have two stable states (on/off or high/low voltage), which map directly onto the two binary digits 1 and 0. This makes binary the natural and most reliable way to represent and process information in hardware.
A bit is a single binary digit (0 or 1). A byte is a group of 8 bits, which can represent 256 different values (0 to 255). Bytes are the standard unit for measuring data and memory.
Computers most commonly use two's complement, where a negative number is formed by inverting all the bits of its positive counterpart and adding 1. This lets addition and subtraction use the same hardware regardless of sign. This calculator shows negative subtraction results with a minus sign for readability.