Binary Calculator
Add, subtract, multiply and divide binary numbers, and convert between binary and decimal, with the working shown.
Change the values and press Calculate to work out your own figures.
Binary arithmetic
Enter two binary numbers and choose an operation.
Show the working
- Convert to decimal: 10101010₂ = 170 and 11001100₂ = 204
- Work it out: 170 + 204 = 374
- Convert back to binary: 374 = 101110110₂
Binary to decimal
Enter a binary number to write it in decimal.
Show the working
- 10101010₂ = 1 × 2⁷ + 0 × 2⁶ + 1 × 2⁵ + 0 × 2⁴ + 1 × 2³ + 0 × 2² + 1 × 2¹ + 0 × 2⁰ = 170
Decimal to binary
Enter a decimal number to write it in binary.
Show the working
- 170 ÷ 2 = 85 remainder 0
- 85 ÷ 2 = 42 remainder 1
- 42 ÷ 2 = 21 remainder 0
- 21 ÷ 2 = 10 remainder 1
- 10 ÷ 2 = 5 remainder 0
- 5 ÷ 2 = 2 remainder 1
- 2 ÷ 2 = 1 remainder 0
- 1 ÷ 2 = 0 remainder 1
- Read the remainders from the bottom up for the whole part
- 170₁₀ = 10101010₂
How to use it
Enter two binary numbers and choose an operation. Enter a binary number to write it in decimal. Enter a decimal number to write it in binary.
Letters stand for digits above 9 (A = 10 … Z = 35) and can be typed in either case; prefixes such as 0b and 0x, spaces and underscores are ignored. Show the working gives each step.
Key facts
Place values: 1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 11 Addition carries at 2: 1 + 1 = 10₂
Binary arithmetic
Binary works like decimal with only two digits: adding 1 + 1 gives 0 and carries 1. Multiplying is shifting and adding. The calculator converts to exact fractions, does the arithmetic, and writes the answer back in binary.
Repeating binary fractions
Only fractions whose denominator is a power of 2 end in binary; 1/3 is 0.(01) and 0.1 in decimal is 0.0(0011), which is why computers can't store 0.1 exactly.
Questions
What is 1 + 1 in binary?
10.
What is 1101 ÷ 11 in binary?
100.(01): 13 ÷ 3 = 4⅓. As a whole-number division it is 100 remainder 1.
Formulas
Place values: 1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 11 Addition carries at 2: 1 + 1 = 10₂
Sources
Limitations
- Numbers have at most 1,000 characters; Roman numerals cover whole numbers from 1 to 3,999,999.