Base-N Arithmetic, Explained
Read this to add, subtract, multiply and divide numbers written in any base from 2 to 36 without first converting them to decimal, and to know exactly what the answer means.
What base-N arithmetic is
A number in base b is a string of digits where each position is worth b times the position to its right. In base 2, the digits 1011 mean 1 \cdot 8 + 0 \cdot 4 + 1 \cdot 2 + 1 \cdot 1 = 11. Base-N arithmetic performs the four basic operations while keeping both inputs and the result in that same base.
The rules are the ones you learned in grade school for base 10, with one change: you carry and borrow at b instead of at 10. In base 2 you carry whenever a column reaches 2. Here is the hook: 1011 + 110 in base 2 gives 10001, which is 17 in decimal. The calculator shows all of this at once, so you never have to trust a single conversion by hand.
When to use it, and when not
Reach for base arithmetic when the base carries meaning. Binary (base 2), octal (base 8) and hexadecimal (base 16) show up in computing because they map cleanly onto bits. One hex digit equals exactly 4 bits, so FF in base 16 is 11111111 in base 2, both equal to 255. Working in the native base keeps that structure visible.
You do not need base arithmetic for ordinary counting or money; base 10 already does that. You also should not use it as a shortcut for modular arithmetic. Changing the base does not change a number's value or its remainders. If your real question is about remainders and cycles, the Congruence Solver (CRT) is the right tool.
Bases above 10 use letters as digits. Digit A means 10, B means 11, up to Z which means 35. That is why the maximum base is 36: there are 10 numerals plus 26 letters.
The place-value formula
Every base result rests on one identity. A digit string d_{n} d_{n-1} \ldots d_1 d_0 in base b has the value
Here d_i is the digit in position i counting from the right starting at 0, and b is the base. Each d_i must satisfy 0 \le d_i \lt b. For 1011 in base 2, V = 1 \cdot 2^3 + 0 \cdot 2^2 + 1 \cdot 2^1 + 1 \cdot 2^0 = 11.
Arithmetic in any base uses this identity twice. Convert each input to its value V, apply the operation on those values, then convert the result back to base b. Addition, subtraction and multiplication give exact integers. Division here is whole (integer) division, so a \div b returns the quotient q where a = q \cdot b + r with 0 \le r \lt b, and the remainder r is discarded from the quotient but reported separately.
Worked example: 1011 + 110 in base 2
Adding two binary numbers column by column
Use the demo values: base 2, first number 1011, operation add, second number 110.
- Line the numbers up on the right, padding the shorter one:
1011over0110. - Column 0 (rightmost): 1 + 0 = 1. Write
1, carry0. - Column 1: 1 + 1 = 2. In base 2 that is
10, so write0, carry1. - Column 2: 0 + 1 + 1 = 2 again. Write
0, carry1. - Column 3: 1 + 0 + 1 = 2. Write
0, carry1. - The final carry becomes a new leftmost digit
1. Reading top to bottom:10001.
Check with place value. 1011 is 11 and 110 is 6, so the sum is 17. And 10001 in base 2 is 16 + 1 = 17. The two paths agree.
An interactive to feel the carry threshold
The single idea a static page cannot show is how the same two values look completely different once you slide the base. Move the base and watch the digits regroup while the decimal value on the right stays fixed.
Reading the four operations
The calculator reports the result in the working base, in decimal, and in the other common bases so you can cross-check. Here is how the four operations behave on the same pair, using base 2 with a = 1011 (11) and b = 110 (6).
| Operation | Base 2 result | Decimal | Note |
|---|---|---|---|
| add | 10001 | 17 | 11 + 6 |
| sub | 101 | 5 | 11 − 6 |
| mul | 1000010 | 66 | 11 × 6 |
| div | 1 | 1 | 11 ÷ 6, remainder 5 |
Notice that multiplication roughly adds digit lengths: a 4-digit and a 3-digit binary number produce a 7-digit product, because 2^3 \cdot 2^2 = 2^5 and the extra bits push the total near 2^6. Division discards the remainder from the quotient, so 11 ÷ 6 is 1 with 5 left over, not 1.833.
10001); in bases 8, 10 and 16 it needs only 2.Common mistakes
Most errors come from four places. Each is easy to catch once you know the pattern.
- Illegal digit for the base
- In base 2 the only valid digits are 0 and 1. Writing
1012is meaningless, because a digit must satisfy 0 \le d_i \lt b. In base 16,Gis invalid since it would stand for 16. - Carrying at 10 instead of at the base
- In base 8, 5 + 5 = 12, not
10, because 10 in decimal is written12in octal (one eight plus two). Carry as soon as a column reaches the base. - Expecting a fractional quotient
- Division here is whole division.
7 ÷ 2in any base gives quotient 3 and remainder 1, never3.5. - Reading letters as base 10
Ais a single digit equal to 10, not the two-digit number ten. In base 16,1Ais 1 \cdot 16 + 10 = 26.
Subtraction can go negative. 110 − 1011 in base 2 is 6 − 11 = −5, shown as -101. The minus sign sits outside the digit string; the digits themselves still follow the base rules.
Related tools
Base arithmetic sits inside discrete and logic work. When you move from binary values to binary logic, the Truth Table Generator handles the boolean side. If you are studying integers structurally, the Prime Number Tools test primality and list primes, and the Linear Diophantine Equations solver finds integer solutions of ax + by = c. For working with collections of numbers rather than single values, see the Set Calculator.
Frequently asked questions
Does changing the base change the number's value?
No. 1011 in base 2, 13 in base 8, 11 in base 10 and B in base 16 are the same quantity, eleven. Only the written form differs. Arithmetic results agree across bases for the same reason.
Why is 36 the largest base allowed?
Each digit needs a unique symbol. There are 10 numerals (0 to 9) and 26 letters (A to Z), giving 36 symbols in total. Base 37 would need a 37th symbol that has no standard meaning.
How do I do division with a decimal answer?
You cannot here; this is whole (integer) division. 11 ÷ 6 returns quotient 1 and remainder 5. To reconstruct the exact value, use a = q \cdot b + r, so 11 = 1 \cdot 6 + 5.
What happens if I enter a digit that is too large for the base?
The input is invalid and the calculation cannot proceed. A digit must be strictly less than the base. Fix the digit or raise the base so the digit is allowed.
Is hexadecimal case sensitive?
No. ff and FF both mean 255 in base 16. The calculator treats upper and lower case letters as the same digit.