💻 Binary Calculator
Binary Calculator
Bitwise Operations
The two numbers are padded with leading zeros to the same length so the bits align column by column. NOT flips every bit of the first number, padded up to a whole number of bytes (8, 16, 32… bits).
Binary Converter
One value, three forms: the converter shows the binary, decimal and hex versions of a single number, with no arithmetic.
Binary is the language of computers: every number is a string of 0s and 1s, where each position is worth twice the one to its right. This calculator does the base-2 arithmetic for you and translates the answer back to decimal.
Type two binary numbers using only 0 and 1, pick the operation, and you get the result in both binary and decimal — handy for checking homework or debugging bit math.
How to use this calculator
Type two binary numbers using only 0s and 1s, pick add, subtract or multiply, and press Calculate.
- Type the first binary number into the First binary number field, using only the digits 0 and 1.
- Choose the Operation: add, subtract or multiply.
- Type the second binary number into the Second binary number field.
- Press Calculate and read the answer in binary, with the decimal equivalent shown underneath.
Arithmetic in the alphabet of computers
Binary uses only two digits, 0 and 1, but the arithmetic rules are the same ones you know from decimal — each column just fills up much faster, because a column holds only 0 or 1 before it must carry. This calculator adds, subtracts, multiplies and divides binary numbers, runs the bitwise operations computers are built on, and shows every result in binary, decimal and hex at once, with a converter alongside for single values.
Worked example: 1010 + 0110
Step 1 — line up the columns and add from the right: 0 + 0 = 0; 1 + 1 = 10 in binary, so write 0, carry 1; 0 + 1 + carry 1 = 10, write 0, carry 1; 1 + 0 + carry 1 = 10, write 0, carry 1; the final carry becomes a new leading 1
Step 2 — read the result: 10000
Step 3 — check in decimal: 1010 = 10 and 0110 = 6, and 10 + 6 = 16 — and 10000 in decimal is exactly 16 (hex 10). Every binary calculation on this page can be sanity-checked the same way.
What does this binary calculator compute?
It adds, subtracts and multiplies binary numbers, the base-2 system computers use. Every answer appears in binary and in decimal, so you can check your work in the system you understand best.
Subtraction borrows in twos
| Step | What happens |
|---|---|
| 10000 − 0110 | Align: 10000 over 00110 |
| Rightmost columns | 0 − 0 = 0; then 0 − 1 cannot be done, so borrow |
| Borrowing | A borrowed 1 is worth 2 in the column it lands in (not 10 as in decimal) — here the leading 1 lends across the zeros until the second column holds 2 |
| Result | 01010 — check: 16 − 6 = 10, and 01010 = 10 ✓ |
Division and multiplication
Multiplication works as shift-and-add — 101 × 11: 101 + 1010 = 1111 (check: 5 × 3 = 15, and 1111 = 15). Division is repeated comparison and subtraction: 1010 ÷ 10 = 101, because 10 goes into 1010 exactly 101 times in binary terms — check in decimal: 10 ÷ 2 = 5, and 101 = 5.
The bitwise operations — logic on every column at once
Bitwise operations compare the two numbers column by column, independently. On 1010 and 1100:
| Operation | Rule per column | Result |
|---|---|---|
| AND | 1 only where BOTH have 1 | 1000 |
| OR | 1 where EITHER (or both) has 1 | 1110 |
| XOR | 1 where the two DIFFER | 0110 |
| NOT (of 1010, 8-bit) | Flip every bit | 11110101 |
AND is how programs mask off bits they do not care about, XOR swaps and toggles, and NOT is the building block of negative numbers in computers (two's complement).
Reading the three forms
The same value wears three costumes: decimal 17 = binary 10001 = hex 11. Hex is just binary in chunks of four bits (1000 1 → grouping from the right: 1 0001 → 1, 1) — which is why programmers read long binary strings in hex. The converter on this page moves a single value between the forms without any arithmetic.
Frequently asked questions
What is 1010 + 0110 in binary?
10000. Adding column by column with carries gives 10000, and the decimal check confirms it: 1010 is 10, 0110 is 6, and 10 + 6 = 16, which is 10000 in binary (hex 10). The calculator shows this column working for your own numbers.
Can this calculator divide binary numbers?
Yes — division is one of the four arithmetic operations. For example, 1010 ÷ 10 = 101 (in decimal: 10 ÷ 2 = 5, and 101 is 5). Where a division does not come out exact, the remainder is reported alongside the quotient.
What is the difference between AND, OR and XOR?
All three compare two binary numbers column by column. AND gives 1 only where both bits are 1; OR gives 1 where at least one bit is 1; XOR gives 1 only where the bits differ. On 1010 and 1100: AND = 1000, OR = 1110, XOR = 0110.
How do I convert decimal 16 to binary?
Use the converter on this page, or divide by 2 repeatedly and read the remainders upwards: 16 → 8 r0, 8 → 4 r0, 4 → 2 r0, 2 → 1 r0, 1 → 0 r1, giving 10000. The same value in hex is 10, since hex groups binary digits in fours.
Why does the result appear in binary, decimal and hex together?
Because binary results are hard to sanity-check by eye. Showing 10001 alongside its decimal (17) and hex (11) forms lets you verify the calculation against ordinary arithmetic — if the decimal version does not match what you expect, the input was probably typed in the wrong base.







































