Binary Converter

Binary is the number system computers use: it writes every number with just two digits, 0 and 1. Type a binary number to see it in ordinary (decimal) numbers, or switch and type a decimal number to see it in binary. The steps show how it works with your own number, so you can check homework or learn to do it by hand.

Whole numbers from 0 up to 256 binary digits. Spaces are fine.

In decimal
45 Decimal

101101 in binary is 45 in decimal.

Hexadecimal 2D
Bits 6
Bytes 1

What is binary?

Our everyday numbers are base 10: ten digits, and each place is worth ten times the one to its right. Binary is base 2: two digits, 0 and 1, and each place is worth twice the one to its right (1, 2, 4, 8, 16 …). It is the system computers use: their circuits work in base 2. Counting works the same way: when you run out of digits, you carry one to the next place, so after 1 comes 10.

Source OpenStax Contemporary Mathematics · 4.3 Converting with Base Systems ↗

How to convert binary to decimal

Multiply each digit by its place value (1, 2, 4, 8, 16 …), then add them up.

Here it is with your numbers:

  1. Place values from the right: 1, 2, 4, 8, 16, 32.
  2. Add the place values that have a 1: 32 + 8 + 4 + 1 = 45

It means 101101 in binary and 45 in decimal are the same number.

How to convert decimal to binary

Divide by 2 again and again until you reach 0. The remainders, read from the bottom up, are the binary digits.

Here it is with your numbers:

  1. 2,026 ÷ 2 = 1,013, remainder 0
  2. 1,013 ÷ 2 = 506, remainder 1
  3. 506 ÷ 2 = 253, remainder 0
  4. 253 ÷ 2 = 126, remainder 1
  5. 126 ÷ 2 = 63, remainder 0
  6. 63 ÷ 2 = 31, remainder 1
  7. 31 ÷ 2 = 15, remainder 1
  8. 15 ÷ 2 = 7, remainder 1
  9. 7 ÷ 2 = 3, remainder 1
  10. 3 ÷ 2 = 1, remainder 1
  11. 1 ÷ 2 = 0, remainder 1
  12. Read the remainders from the bottom up: 11111101010.

It means 2,026 in decimal and 11111101010 in binary are the same number.

To check an answer, convert it back: the place values of the 1s should add up to the number you started with.

Binary numbers chart

Tap a number to convert it.

FAQs

How to convert binary to decimal?

Write the place values under the digits from the right, 1, 2, 4, 8, 16 and so on, each double the last. Then add the place values that have a 1. For 1011 that is 8 + 2 + 1, so 1011 in binary is 11.

Source OpenStax Contemporary Mathematics · 4.3 Converting with Base Systems ↗

How to convert decimal to binary?

Divide by 2 again and again, writing down each remainder, until you reach 0. The remainders read from the last one to the first are the binary number. 100 gives the remainders 0, 0, 1, 0, 0, 1, 1, so 100 in binary is 1100100.

How to read binary?

Read it like ordinary numbers, but each place is worth twice the place to its right instead of ten times: 1, 2, 4, 8, 16, 32 … A 1 means “count this place” and a 0 means “skip it”, so 101 is 4 + 1, which is 5.

What is the binary system?

Binary is base 2: it uses only the digits 0 and 1, and its place values are powers of 2. It is the number system computers use. Counting in binary goes 0, 1, 10, 11, 100, 101 …

Sources

Related calculators