DigitHelm
Computer Science

Number Base Arithmetic | Add, Subtract, Multiply & Divide in Any Base

Perform addition, subtraction, multiplication, and division directly in any number base from 2 to 16 without first converting to decimal. Shows full carry and borrow steps column by column exactly as done by hand, with decimal cross-verification and support for binary, octal, and hexadecimal.

Instant Results100% FreeAny DeviceNo Sign-up

Base:

Valid digits for base 2: 01

What Is the Number Base Arithmetic | Add, Subtract, Multiply & Divide in Any Base?

In any number system with base b, each position represents a power of b, and only digits 0 through b−1 are valid. Binary (base 2) uses only 0 and 1, octal (base 8) uses 0–7, and hexadecimal (base 16) uses 0–9 and A–F. Addition and subtraction work identically to decimal but carry or borrow at b instead of 10. This calculator performs all four arithmetic operations directly in any base 2–16 with column-by-column carry/borrow steps.

Formula

Digits: 0–9, A(10), B(11) … F(15) for base 16

Addition: column-by-column, carry = ⌊sum / base⌋

Subtraction: borrow base when digit insufficient

Multiplication / Division: via decimal cross-verification

1011₂ + 1101₂ = 11000₂ (with carry steps)

How to Use

  1. 1

    Click a base button (2, 8, 10, 16) or type a custom base from 2 to 16

  2. 2

    Valid digits for the chosen base are shown below the selector

  3. 3

    Enter the first number using only valid digits for the chosen base

  4. 4

    Enter the second number the same way

  5. 5

    Click +, −, *, or / to select the operation

  6. 6

    Or click a preset (Binary +, Hex ×, Octal −, Base 5 +)

  7. 7

    Click Calculate to see result, steps, and decimal verification

Select a base using the quick buttons (2, 8, 10, 16) or enter any base from 2 to 16 in the Custom field. Enter the two numbers using valid digits for that base. Choose an operation (+, −, ×, ÷). Click Calculate to see the result, carry/borrow steps, decimal verification, and the result expressed in all four standard bases.

Example Calculation

Example: 1011₂ + 1101₂ (binary addition)

col 0: 1 + 1 = 2 → write 0, carry 1

col 1: 1 + 0 + carry 1 = 2 → write 0, carry 1

col 2: 0 + 1 + carry 1 = 2 → write 0, carry 1

col 3: 1 + 1 + carry 1 = 3 → write 1, carry 1

col 4: carry 1 → write 1

Result: 11000₂ = 24₁₀ ✓

Frequently Asked Questions

How does binary carry work?

In binary, valid digits are 0 and 1. When two 1s are added, the sum is 2 = 10₂ — so you write 0 and carry 1 to the next column. This is exactly like decimal carrying but carries happen at 2 instead of 10. Three 1s (including a carry-in) give 11₂, so you write 1 and carry 1.

What digits are valid in hexadecimal?

Hexadecimal (base 16) uses sixteen digits: 0–9 for values 0–9 and A, B, C, D, E, F for values 10–15. The calculator accepts both upper and lower case letters. One hex digit represents exactly 4 binary bits, making hex a compact notation for binary data.

Why show the result in four bases simultaneously?

Programmers frequently need to cross-check values across binary (hardware), octal (Unix permissions), decimal (mental arithmetic), and hexadecimal (memory addresses, color codes). Showing all four at once eliminates manual conversion steps and makes it easy to verify the computation.

How does subtraction handle negative results?

If the second number is larger than the first, the result is negative. The calculator detects this (|b|>|a|), swaps them, computes |b|−|a| using borrow steps, and prefixes the result with a minus sign. The decimal verification confirms the sign and magnitude.

You Might Also Like

Explore 360+ Free Calculators

From math and science to finance and everyday life — all free, no account needed.