Zero Signup ToolsFree browser tools

Developer Tools

Binary Arithmetic Calculator

Add, subtract, multiply, and divide binary numbers in your browser with step-by-step carry, borrow, partial products, and long division.

Operation

Column-by-column addition with the carry row written above each column, exactly like binary addition by hand.

Examples

Use only 0 and 1. Optional 0b prefix, spaces, and underscores are ignored (1011_0010 or 0b 1011 0010 both work). Up to 256 bits.

Step-by-step working

Aligned the same way a textbook would write it out by hand.

Carry
011100
A
 01011
+ B
 00110
Sum
010001

Inputs are unsigned binary integers. Subtraction shows the textbook borrow pattern even when A is smaller than B; the two's complement readout uses the chosen bit width. All math runs in your browser with BigInt, so the numbers you enter stay on your device.

How to use

  1. Pick an operation: Addition (A + B), Subtraction (A - B), Multiplication (A * B), or Division (A / B). The description under the buttons explains exactly what the tool will show.
  2. Type Operand A and Operand B as binary numbers. The 0b prefix is optional, and spaces and underscores between digits are ignored so 1011_0010, 0b 1011 0010, and 10110010 all work.
  3. For Subtraction, optionally pick the bit width (8, 16, 32, 64, or 128) used to render the two's complement form when A is smaller than B.
  4. Read the Result card for the answer in binary, decimal, hexadecimal, and octal, then scroll to Step-by-step working to see the column-by-column carry, borrow, partial products, or long division.
  5. Use Swap A and B to switch operands or Clear inputs to reset, and click any Copy button to put a result on your clipboard.

About this tool

Binary Arithmetic Calculator performs the four core operations (addition, subtraction, multiplication, and division) on two unsigned binary numbers and shows the working the same way a computer science textbook would write it out by hand. Addition aligns the two operands in columns, runs them bit by bit from the least significant column to the most significant, and writes the carry above each column so the propagation chain is visible at a glance. Subtraction does the same with the borrow row; when A is smaller than B the tool flips the operands to keep the textbook borrow pattern intact and also reports the signed difference plus its two's complement representation at 8, 16, 32, 64, or 128 bits so you can confirm what a fixed-width CPU would store. Multiplication builds the full partial-product table, one shifted copy of A for every 1 bit in B, lines them up in a triangle, and sums them to produce A times B (the same algorithm a CPU's shift-and-add multiplier uses internally). Division runs shift-and-subtract long division, walking the dividend's bits most-significant first, bringing each into a running remainder, and recording a 1 in the quotient whenever the divisor fits, just like the long-division layout taught in school. Every result is reported in binary, decimal, hexadecimal, and octal so you can cross-check by hand, and a copy button next to each value pulls the formatted number straight to your clipboard. Inputs accept up to 256 bits, allow an optional 0b prefix, and ignore underscores and spaces so grouped inputs like 1011_0010 or 1011 0010 work. Everything runs locally with JavaScript BigInt; the numbers you type stay on your device and nothing is uploaded. Useful for computer architecture and digital logic homework, programming exercises that involve carries and borrows, embedded firmware debugging, CTF challenges with binary arithmetic, and any time you want to confirm the bit-level steps a CPU would actually take to add, subtract, multiply, or divide two numbers.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsDeveloper Tools