Binary Calculator
The Binary Calculator performs arithmetic and bitwise operations on binary (base 2) numbers. Binary is the fundamental number system used by computers, built from only two digits: 0 and 1. Each position represents a power of 2, which is why a simple string of bits can encode any number.
Common Use Cases
Low-Level Programming
Learning & Homework
Networking & Masks
How to Use the Binary Calculator
Enter the First Number
Type the first binary number using only the digits 0 and 1. The 0b prefix is added automatically, so you only enter the bits themselves.
Choose an Operator
Pick an arithmetic operator (+, −, ×, ÷, %) or a bitwise operator (&, |, ^, «, »). Bitwise operators are available on the Binary tab.
Enter the Second Number
Type the second binary value into the lower field. For shift operations this is the number of positions to shift.
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.
Features
Arithmetic & Bitwise Operations
Every operator the calculator supports is listed below, 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
What is binary?
Binary is a base-2 number system that uses only 0 and 1. Each digit represents a power of 2. For example, 1010 in binary equals 10 in decimal (8 + 2).
What are bitwise operations?
Bitwise operations work on individual bits. AND (&) returns 1 only if both bits are 1. OR (|) returns 1 if either bit is 1. XOR (^) returns 1 when the two bits differ.
How do shift operations work?
Left shift («) multiplies by 2 for each position moved; right shift (») divides by 2. For example, 0001 « 4 = 10000, which is 1 × 2⁴ = 16 in decimal.
Why are results shown in four bases?
The same value is displayed in binary, octal, decimal, and hexadecimal so you can read it in whichever base your task needs and copy any format with one click — useful when moving between code, math, and documentation.
Can it handle very large binary numbers?
Yes. The calculator uses BigInt arithmetic, so large values remain exact and are not rounded the way standard floating-point numbers would be.
No comments yet. Be the first to comment!