Worked example

Operation: Add
a: FF
b: 1
Input base: 16
Output base: 16
FF₁₆ + 1 = (15 × 16 + 15) + 1 = 16² = 100₁₆

→ 100

Method and scope

Exact arithmetic in bases 2–36; up to 1,024 characters per operand. Division truncates toward zero. The remainder has the dividend’s sign: −7 ÷ 3 gives q=−2, r=−1. Division by zero is rejected.

a = q × b + r; |r| < |b|