Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)

Perform arithmetic and bitwise operations on binary numbers. Add, subtract, multiply, divide, and use AND, OR, XOR, shift operations.

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.

Why base 2? Digital circuits have two stable states — off and on — so every value inside a computer is ultimately stored as binary. This tool lets you compute on those values directly, without converting by hand.

Common Use Cases

Low-Level Programming

Test bit masks, flags, and shift logic before writing them into firmware, drivers, or embedded code.

Learning & Homework

Check binary addition and bitwise exercises for computer science and digital logic courses.

Networking & Masks

Work out subnet masks and bit-level flags where AND and OR define how addresses are split.

How to Use the Binary Calculator

1

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.

2

Choose an Operator

Pick an arithmetic operator (+, , ×, ÷, %) or a bitwise operator (&, |, ^, «, »). Bitwise operators are available on the Binary tab.

3

Enter the Second Number

Type the second binary value into the lower field. For shift operations this is the number of positions to shift.

4

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.

Quick start: Use the Try examples chips to load a ready-made expression, then tweak the values to explore how the result changes across all four bases.

Features

Arithmetic & Bitwise Operations

Every operator the calculator supports is listed below, with a worked binary example you can reproduce in the tool.

OperatorNameExample (binary)Decimal
+Addition1010 + 0101 = 111110 + 5 = 15
Subtraction1010 − 0011 = 011110 − 3 = 7
×Multiplication1010 × 0010 = 1010010 × 2 = 20
÷Division1010 ÷ 0010 = 010110 ÷ 2 = 5
%Modulo1010 % 0011 = 000110 % 3 = 1
&AND1010 & 1100 = 100010 & 12 = 8
|OR1010 | 1100 = 111010 | 12 = 14
^XOR1010 ^ 1100 = 011010 ^ 12 = 6
«Left Shift0001 « 4 = 100001 « 4 = 16
»Right Shift1000 » 2 = 00108 » 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.

Bitwise operators are binary-only. Arithmetic operators are available on every tab, but AND, OR, XOR, and shifts appear only on the Binary tab because they act directly on individual bits.

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.

0b
0b
BIN
OCT
DEC
HEX
Enter values to calculate
Try examples
Operator Name Example
+ Addition 1010 + 0101 = 1111
Subtraction 1010 − 0011 = 0111
× Multiplication 1010 × 0010 = 10100
÷ Division 1010 ÷ 0010 = 0101
% Modulo 1010 % 0011 = 0001
& AND 1010 & 1100 = 1000
| OR 1010 | 1100 = 1110
^ XOR 1010 ^ 1100 = 0110
« Left Shift 0001 << 4 = 10000
» Right Shift 1000 >> 2 = 0010
Enter binary numbers using only 0 and 1
Supports arithmetic (+, −, ×, ÷, %) and bitwise (&, |, ^, <<, >>) operations
Results shown in BIN, OCT, DEC, and HEX formats
Use shift operations for quick multiplication/division by powers of 2
Want to learn more? Read documentation →
1/5

Base Arithmetic Calculator

Binary Calculator (current page) Hex Calculator Octal Calculator
Start typing to search...
Searching...
No results found
Try searching with different keywords