Add, subtract, multiply and divide directly in binary, octal, hex or any base to 36 – plus bit shifts and bitmask operations – all exact. Everything runs locally in your browser.
Your favourites
Recently used
- Binary CalculatorAdd, subtract, multiply or divide two binary numbers with exact BigInt arithmetic – the addition mode traces every column and carry for your actual operands.
- Binary Addition CalculatorAdd two binary numbers with a full column-by-column carry trace – see exactly where 1+1 writes 0 and carries 1, for your actual inputs.
- Binary Subtraction CalculatorSubtract one binary number from another exactly, including negative results – and see why hardware actually subtracts by adding the two’s complement.
- Binary Multiplication CalculatorMultiply two binary numbers exactly, at any length.
- Binary Division CalculatorDivide two binary numbers exactly, returning the integer quotient and the remainder separately – the form long division and hardware dividers actually produce.
- Hex CalculatorAdd, subtract, multiply or divide hexadecimal numbers exactly – with a decimal cross-check in the result so you can verify at a glance.
- Hex Addition CalculatorAdd two hexadecimal numbers exactly – columns carry at 16, so 8 + 9 writes 1 and carries 1, and the decimal cross-check confirms the result.
- Hex Subtraction CalculatorSubtract hexadecimal numbers exactly, including negative results – with borrows worth 16 rather than 10, which is where hand calculations usually slip.
- Hex Multiplication CalculatorMultiply hexadecimal numbers of any size exactly.
- Hex Division CalculatorDivide hexadecimal numbers exactly, returning quotient and remainder in hex with a decimal cross-check – useful for address arithmetic and alignment calculations.
- Octal CalculatorAdd, subtract, multiply or divide octal numbers exactly – carries and borrows happen at 8, and the decimal equivalents are shown so every step can be checked.
- Base-N CalculatorDo exact arithmetic in ANY base from 2 to 36 – pick the base, pick the operation, and get the result in that base with a decimal cross-check.
- Binary Bit Shift CalculatorShift a value left or right and see the bits move – logical shifts insert zeros, arithmetic right shift copies the sign bit, and every shift is a multiply or divide by two.
- Binary Bitmask CalculatorApply AND, OR, XOR and AND-NOT between a value and a mask, bit by bit – the four operations behind testing, setting, toggling and clearing flags.
Frequently asked questions
What do these do that a converter does not?
Arithmetic in the base itself. A converter rewrites one number in another base; these add, subtract, multiply and divide two values and give the result in that same base, with a decimal cross-check beside it.
Why show a column-by-column trace?
Because the answer alone does not show where a carry or borrow occurred. Binary addition carries at two and hexadecimal at sixteen, and seeing the columns is what makes these usable for checking homework or debugging bitwise code.
Is the arithmetic exact?
Yes, at any length, because it uses arbitrary-precision integers rather than floating point. Multiplying two 100-digit binary numbers gives an exact result rather than a rounded one.
How is division handled?
As integer division: the quotient and the remainder are reported separately, which is what division means for integers in these bases. That is more useful than a truncated decimal, and it is what the hardware actually computes.
Can I mix bases in one calculation?
Convert first, then calculate. Mixing bases in a single expression is ambiguous to read and easy to get wrong; converting explicitly leaves a record of what was intended.
What is a bitmask and when do I need one?
A value used with AND, OR or XOR to test, set or clear particular bits. It is how flags are packed into a single integer, and the bitmask tool shows the operation bit by bit so the effect on each position is visible.
Does it handle negative results?
Yes, and it shows what a negative result means in the representation you have chosen, which differs between two's complement and sign-magnitude.
Arithmetic without leaving the base: add, subtract, multiply and divide directly in binary, octal, hex or any base to 36 — plus the bit-level operations, shifts and masks, that arithmetic notation hides. Every result is exact and decimal-verified.
The binary addition trace shows carries column by column; the mask calculator aligns operands bit-for-bit.
Arithmetic without leaving the base
Doing arithmetic directly in binary, octal or hex is the same school algorithm you already know, with one substitution: columns carry when they reach the base, not ten. In binary 1 + 1 writes 0 and carries 1; in octal 7 + 1 is 10; in hex 9 + 8 is 11. Every calculator in this family works on exact big-integer arithmetic, so there is no 32-bit or 64-bit ceiling and no silent overflow — and each result carries a decimal cross-check so you can confirm it independently.