Binary to Decimal Converter

Decimal42
Decimal
42
Binary
10 1010
Hexadecimal
2A
Octal
52
Bits needed
6

Convert numbers between binary (base 2) and decimal (base 10), with hexadecimal and octal shown too. Enter the number and choose the base it is written in.

How to use the Binary to Decimal Converter

  1. Type the number.
  2. Choose the base it is in — binary, decimal, hex or octal.
  3. Read the number in every other base.

How it works

Binary to decimal: each binary digit (bit) is worth a power of two, doubling from right to left: 1, 2, 4, 8, 16… Add the values of the 1 bits. 101010 = 32 + 8 + 2 = 42.

Decimal to binary: divide by 2 repeatedly and write down the remainders; reading them from bottom to top gives the binary number. 42 → 21 r0 → 10 r1 → 5 r0 → 2 r1 → 1 r0 → 0 r1 → 101010.

Decimal to binary chart

DecimalBinaryDecimalBinary
0000081000
1000191001
20010101010
30011111011
40100121100
50101131101
60110141110
70111151111

Frequently asked questions

What is 1010 in decimal?

10 (8 + 2).

What is 255 in binary?

11111111 — eight 1 bits, the largest value in one byte.

Why do computers use binary?

Digital circuits have two stable states, on and off, which map naturally to 1 and 0.

How many values can 8 bits hold?

256 values, from 0 to 255.

Related tools