Arithmetic & Bitwise Math in Base 2
This binary calculator runs arithmetic and bitwise operations directly on base-2 numbers, so you never have to convert to decimal by hand. Binary is built from just two digits — 0 and 1 — where each position stands for a power of 2.
Who It's For
Programmers
Students
Networking
How to Calculate in Binary
Enter the First Number
Type the first value using only the digits 0 and 1. The 0b prefix is added automatically, so you only enter the bits. Invalid characters are flagged as you type.
Choose an Operator
Pick an arithmetic operator (+, −, ×, ÷, %) or a bitwise operator (&, |, ^, «, »). Bitwise operators appear only on the Binary tab.
Enter the Second Number
Type the second binary value into the lower field. For a shift operation, this is the number of positions to move, entered as a plain decimal count.
Calculate & Read Results
Click Calculate or press Enter. The result appears in binary, octal, decimal and hexadecimal at once, each with a one-click copy button.
Operators & Features
Every operator the calculator supports is listed below, each with a worked binary example you can reproduce in the tool.
| Operator | Name | Example (binary) | Decimal |
|---|---|---|---|
+ | Addition | 1010 + 0101 = 1111 | 10 + 5 = 15 |
− | Subtraction | 1010 − 0011 = 0111 | 10 − 3 = 7 |
× | Multiplication | 1010 × 0010 = 10100 | 10 × 2 = 20 |
÷ | Division | 1010 ÷ 0010 = 0101 | 10 ÷ 2 = 5 |
% | Modulo | 1010 % 0011 = 0001 | 10 % 3 = 1 |
& | AND | 1010 & 1100 = 1000 | 10 & 12 = 8 |
| | OR | 1010 | 1100 = 1110 | 10 | 12 = 14 |
^ | XOR | 1010 ^ 1100 = 0110 | 10 ^ 12 = 6 |
« | Left Shift | 0001 « 4 = 10000 | 1 « 4 = 16 |
» | Right Shift | 1000 » 2 = 0010 | 8 » 2 = 2 |
What the Tool Gives You
Results in Four Bases
Each answer is shown at once in binary, octal, decimal and hexadecimal — no separate conversion step needed.
Large-Number Support
Calculations use BigInt, so very large binary values stay exact instead of losing precision.
Full Bitwise Set
AND, OR, XOR and both shift directions, alongside the five arithmetic operators.
Quick Examples
One-tap example expressions plus a built-in operator reference panel for fast recall.
Frequently Asked Questions
How do you add two binary numbers?
Add column by column from the right, carrying when a column reaches 2: 0+0=0, 0+1=1, 1+1=10 (write 0, carry 1). For example, 1010 + 0101 = 1111, which is 10 + 5 = 15. Enter both numbers here and the tool does the carrying for you.
Can I subtract, multiply and divide in binary too?
Yes. All five arithmetic operators work directly on binary values: addition (+), subtraction (−), multiplication (×), division (÷) and modulo (%). Division and modulo by zero are caught and reported instead of crashing.
What do the bitwise AND, OR and XOR operators do?
They compare two numbers bit by bit. AND (&) returns 1 only when both bits are 1; OR (|) returns 1 when either bit is 1; XOR (^) returns 1 only when the two bits differ. These are the basis of masks and flag toggles.
What is a bitwise left or right shift?
A shift moves every bit sideways. Left shift («) multiplies by 2 for each place moved; right shift (») divides by 2. For example, 0001 « 4 = 10000, i.e. 1 × 2⁴ = 16. The second field is the number of positions to shift, entered as a decimal count.
Why is the result shown in four bases at once?
The same value is displayed in binary, octal, decimal and hexadecimal so you can read it in whatever base your task needs and copy any format with one click — handy when moving between code, math and documentation.
Can it handle very large binary numbers?
Yes. The calculator computes with BigInt, so large binary values stay exact rather than being rounded the way standard floating-point numbers would be.
No comments yet. Be the first to comment!