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)

Do arithmetic and bitwise math on binary numbers: add, subtract, multiply, divide, modulo, plus AND, OR, XOR and bit shifts, with results in binary, octal, decimal and hex.

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.

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 bits directly, then read the answer in whichever base you need.

Who It's For

Programmers

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

Students

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

Networking

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

How to Calculate in Binary

1

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.

2

Choose an Operator

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

3

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.

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: Tap a ready-made example to load an expression, then tweak the values to watch the result change across all four bases.

Operators & Features

Every operator the calculator supports is listed below, each 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. The five arithmetic operators work on every tab, but AND, OR, XOR and shifts appear only on the Binary tab because they act directly on individual bits.
Private by design: every calculation runs in your browser. Nothing you type is uploaded or sent to a server.

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.

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 — the 0b prefix is added for you
Bitwise operators (&, |, ^, «, ») are available only on the Binary tab
For shifts, the second value is a decimal count of positions to move
Every result is shown in BIN, OCT, DEC and HEX, each with a one-click copy button
Calculations use BigInt, so large binary values stay exact
Press Enter in either field to calculate instantly
Want to learn more? Read documentation →
1/7

Base Arithmetic Calculator

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