Binary to Decimal

Convert binary numbers to decimal and decimal numbers to binary.

0 chars
0 words
0 lines
0 chars
0 words
0 lines

Binary to Decimal Converter

Convert binary numbers to decimal and decimal numbers to binary in one place. Paste a list with one value per line – 1010 becomes 10, 11111111 becomes 255, and 10000000000 becomes 1024. Switch direction to get the binary representation of any decimal number, with optional padding to full bytes.

How to convert binary to decimal

Each binary digit is worth a power of two, starting with 1 on the right: 1, 2, 4, 8, 16, 32, 64, 128 and so on. Multiply each bit by its place value and add the results. For 101101:

1 × 32 + 0 × 16 + 1 × 8 + 1 × 4 + 0 × 2 + 1 × 1 = 45

For the reverse direction, divide the decimal number by 2 repeatedly and collect the remainders; read from the last remainder to the first. 45 → 22 r1 → 11 r0 → 5 r1 → 2 r1 → 1 r0 → 0 r1, giving 101101.

Handy reference values

  • 1111 = 15 (largest 4-bit value, one nibble)
  • 11111111 = 255 (largest byte value)
  • 1111111111111111 = 65,535 (largest 16-bit value)
  • 32 ones = 4,294,967,295 (largest unsigned 32-bit value)

When you need it

Students use binary to decimal conversion in computer science and digital electronics courses. Developers use it to read bit flags, permission masks, and register values, and network engineers use it to understand subnet masks such as 11111111.11111111.11111111.00000000 (255.255.255.0 – see the CIDR Calculator).

Options and limits

Enable Pad to full bytes to output 00000101 instead of 101, and Group digits to split bits into nibbles or decimal results into thousands (1,048,576). Binary fractions (0.101 = 0.625) and negative numbers are supported. There is no length limit – 64-bit and 128-bit values convert exactly.

Frequently Asked Questions

Write the powers of two (1, 2, 4, 8, …) above the bits from right to left and add the powers where the bit is 1. 1101 = 8 + 4 + 1 = 13.

255. It is the largest value an unsigned 8-bit byte can hold.

Choose Decimal to Binary and turn on 'Pad to full bytes'. The result is padded with leading zeros to a multiple of 8 bits, so 5 becomes 00000101.

Negative numbers keep a minus sign (-5 → -101). For the two's-complement form used by computers, e.g. 11111011 for -5 in 8 bits, use the Bitwise Calculator with a fixed width.