Skip to content
RK Calculator
Menu

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.

About first binary number0s and 1s, for example 1011 or 10.1.
About operationWhat to do with the two numbers.
About second binary number0s and 1s.
Result
Sum in binary
101110110
In decimal
170 + 204 = 374
Answer in octal
566
Answer in hexadecimal
176

10101010 + 11001100 = 101110110 in binary.

Show the working
  1. Convert to decimal: 10101010₂ = 170 and 11001100₂ = 204
  2. Work it out: 170 + 204 = 374
  3. Convert back to binary: 374 = 101110110₂

Binary to decimal

Enter a binary number to write it in decimal.

About binary number0s and 1s, for example 10101010 or 110.101.
Result
In decimal
170
In octal
252
In hexadecimal
AA

10101010 in binary is 170 in decimal.

Show the working
  1. 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.

About decimal numberFor example 170 or 10.625.
Result
In binary
10101010
In octal
252
In hexadecimal
AA

170 in decimal is 10101010 in binary.

Show the working
  1. 170 ÷ 2 = 85 remainder 0
  2. 85 ÷ 2 = 42 remainder 1
  3. 42 ÷ 2 = 21 remainder 0
  4. 21 ÷ 2 = 10 remainder 1
  5. 10 ÷ 2 = 5 remainder 0
  6. 5 ÷ 2 = 2 remainder 1
  7. 2 ÷ 2 = 1 remainder 0
  8. 1 ÷ 2 = 0 remainder 1
  9. Read the remainders from the bottom up for the whole part
  10. 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.

Formula version 0.1.0Reviewed