# Binary Calculator

URL: https://speedycalculator.com/calculators/math/binary-operations/
Last updated: 2026-10-30

> The binary calculator adds, subtracts, multiplies and divides two binary numbers, giving the result in binary and decimal with the method shown and an optional fixed bit width.

## Inputs

- Operation
- Binary number 1
- Binary number 2
- Representation

## Results

- Result (binary)
- Result (decimal)
- Remainder
- Number 1 in decimal
- Number 2 in decimal
- In the chosen bit width
- Method

## Formula

```
Addition carries at 2 · subtraction borrows 2 · multiplication shifts and adds · division gives quotient and remainder
```

## Explanation

All arithmetic in a computer happens in binary. This calculator performs the four basic operations on binary numbers and shows how each is done, which makes it a handy companion for computer science courses.

### How to use the Binary Calculator

- **Operation**
- **Binary number 1**
- **Binary number 2**
- **Representation**

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

### How it works

Choose the operation, enter two binary numbers and optionally a bit width.

## Worked example

Inputs — Operation: Addition +; Binary number 1: 1011; Binary number 2: 111; Representation: Automatic (fit the numbers).

Results — **Result (binary) = 1 0010**; Result (decimal) = 18; Number 1 in decimal = 11; Number 2 in decimal = 7; Method = carry 111
01011
+ 00111
─────
10010.

## Key terms

- **Binary**: Base 2, using only 0 and 1.

## FAQ

**How do I convert a binary result to decimal?**
Add the powers of 2 for every 1 bit.

**What is 1111 + 1?**
10000 (15 + 1 = 16).

**Why do bit widths matter?**
Real registers have fixed sizes, so results can overflow.

**Can I enter negative numbers?**
Yes, with a leading minus sign.


## Sources

- [Wolfram MathWorld – Binary](https://mathworld.wolfram.com/Binary.html)
- [Harvard CS50 – Binary and bitwise operators](https://cs50.harvard.edu/x/)
