Skip to the tool
Binary Translator Free tools

The binary number system

Binary is the base-2 number system: every number is written with just 0 and 1. Here is how to read binary numbers, how to count in binary, and a binary chart to check your work.

Updated · Written and checked by Murugan Vellaichamy

Waiting for input

Prefixes 0b, 0o, 0x and spaces or underscores between digits are fine. A point starts the fraction.

Result
Try:

How does the binary number system work?

Decimal, the system we use every day, has ten digits and each place is worth ten times the place to its right. Binary has two digits, 0 and 1, and each place is worth two times the place to its right. So the places in a binary number are worth 1, 2, 4, 8, 16, 32, 64, 128 and so on, from right to left.

How do you read binary numbers?

  1. Write the place values over the digits, starting with 1 on the right and doubling to the left.
  2. Keep the place values that sit over a 1, and ignore the ones over a 0.
  3. Add them up.

For 101101 the 1s sit in the 32, 8, 4 and 1 places, so the number is 32 + 8 + 4 + 1 = 45.

DigitPlace valueDigit × place value
125 = 3232
024 = 160
123 = 88
122 = 44
021 = 20
120 = 11

Counting in binary

Counting starts 0, 1, and then the ones place runs out of digits. It goes back to 0 and carries 1 into the next place, giving 10, which is two. Then 11 (three), 100 (four), 101, 110, 111, 1000 (eight). Every time a number is all 1s, the next number is a 1 followed by zeros, and it is a power of 2.

A quick check: with n bits you can count from 0 up to 2n − 1. Four bits go up to 1111, which is 15; eight bits go up to 11111111, which is 255.

Binary chart: 0 to 32

DecimalBinary8-bit binary
0000000000
1100000001
21000000010
31100000011
410000000100
510100000101
611000000110
711100000111
8100000001000
9100100001001
10101000001010
11101100001011
12110000001100
13110100001101
14111000001110
15111100001111
161000000010000
171000100010001
181001000010010
191001100010011
201010000010100
211010100010101
221011000010110
231011100010111
241100000011000
251100100011001
261101000011010
271101100011011
281110000011100
291110100011101
301111000011110
311111100011111
3210000000100000

The full chart for one byte, 0 to 255 with hex, octal and signed values, is on the binary numbers 0 to 255 page.

Writing other numbers in binary

  • From decimal: divide by 2 again and again and read the remainders from the bottom up. The decimal to binary converter shows every step.
  • Negative numbers: computers use two’s complement, where the leftmost bit counts as negative.
  • Fractions: places to the right of the point are worth ½, ¼, ⅛ and so on, so 0.101 in binary is ½ + ⅛ = 0.625.
  • Shorter forms: group the bits in fours for hexadecimal, or in threes for octal.
  • One bit at a time: Gray code orders numbers so that each one differs from the next in a single bit.

To practise reading and writing binary, print a set of binary worksheets with answer keys.

Sources and method

Conversions use exact whole-number arithmetic (JavaScript BigInt), so long numbers keep every digit. Fractions are kept as exact ratios; when the digits repeat, the repeating block is found and marked instead of rounded.

Questions

What is 10 in binary?

1010: one 8 and one 2.

Why do computers use the binary number system?

Their circuits store and switch between two states, and two states are the easiest to tell apart reliably. Each state is a bit: 0 or 1.

How do you read a binary number quickly?

Learn the place values 128, 64, 32, 16, 8, 4, 2, 1 for one byte. Then add the ones that sit over a 1.

Is binary the same as base 2?

Yes. The binary number system is the base-2 number system.

More converters

Copied