Convert between binary and decimal instantly, with full step-by-step working.
Binary uses only digits 0 and 1.
Binary is the language computers use at their most basic level, built from only two digits: 0 and 1. Humans, on the other hand, think naturally in decimal, the base-10 system we learn as children. Converting between the two is a core skill in computer science, electronics and networking, and it comes up constantly in coding interviews, homework and everyday troubleshooting.
Our Binary to Decimal Calculator converts instantly in both directions. Enter a binary number to get its decimal value, or switch direction and enter a decimal number to get its binary form. Every result comes with clear step-by-step working, so you can learn the method, not just copy an answer. It is free, works on any device and needs no sign-up.
In binary, each digit, called a bit, represents a power of 2, starting from the rightmost digit. Reading right to left, the place values are 1, 2, 4, 8, 16, 32 and so on, doubling each time. A binary number is simply a set of on/off switches, where 1 means "on" and 0 means "off", and computers use exactly this idea in their circuits and memory.
To convert binary to decimal, multiply each digit by its place value (a power of 2) and add the results together.
Example: convert 1010 to decimal.
1010 = (1×23) + (0×22) + (1×21) + (0×20)
= 8 + 0 + 2 + 0 = 10
To convert decimal to binary, repeatedly divide the number by 2 and record the remainders. Reading the remainders from bottom to top gives the binary number.
Example: convert 13 to binary.
13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Reading bottom to top: 1101
| Decimal | Binary | Decimal | Binary |
|---|---|---|---|
| 0 | 0 | 8 | 1000 |
| 1 | 1 | 9 | 1001 |
| 2 | 10 | 10 | 1010 |
| 3 | 11 | 16 | 10000 |
| 4 | 100 | 32 | 100000 |
| 5 | 101 | 64 | 1000000 |
| 6 | 110 | 128 | 10000000 |
| 7 | 111 | 255 | 11111111 |
Convert 11001 to decimal.
11001 = (1×24) + (1×23) + (0×22) + (0×21) + (1×20)
= 16 + 8 + 0 + 0 + 1 = 25
Convert 37 to binary.
37 ÷ 2 = 18 remainder 1
18 ÷ 2 = 9 remainder 0
9 ÷ 2 = 4 remainder 1
4 ÷ 2 = 2 remainder 0
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1
Reading bottom to top: 100101
Convert 11111111 (8 ones) to decimal.
This is the maximum value for one byte: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
Computer hardware is built from transistors that are either switched on or off, which maps perfectly onto the two binary digits. Every file, image, letter and number your computer handles is ultimately stored as a long sequence of 0s and 1s. Higher-level systems like text, colors and instructions are just different ways of interpreting those same binary patterns.
Binary addition follows the same logic as decimal addition, just with only two digits. The key rules are: 0+0=0, 0+1=1, 1+0=1, and 1+1=10 (write 0, carry 1). For example, adding 101 (5) and 011 (3) gives 1000 (8), carrying just like you would carry a "10" in decimal addition.
Understanding this carry process is useful beyond conversion. It is the same logic computer processors use, at extremely high speed, to perform all arithmetic operations internally.
| Unit | Size | Max Decimal Value |
|---|---|---|
| 1 bit | 1 binary digit | 0 – 1 |
| 1 nibble | 4 bits | 0 – 15 |
| 1 byte | 8 bits | 0 – 255 |
| 16-bit | 2 bytes | 0 – 65,535 |
| 32-bit | 4 bytes | 0 – 4,294,967,295 |
A single byte, made of 8 bits, is the standard building block for storing a character of text (like in ASCII) and is the base unit used to measure file and memory sizes such as kilobytes and megabytes.
Most programming languages let you write binary literals directly, usually with a 0b prefix, such as 0b1010 for 10 in Python, JavaScript, C and many others. Built-in functions also handle conversions for you: Python's bin() and int(x, 2), JavaScript's Number.toString(2) and parseInt(x, 2), are common examples. Knowing the manual method, as shown above, still helps you understand what these functions are doing internally and makes debugging bit-level issues much easier.
Binary is not the only alternative to decimal. Hexadecimal (base 16) uses digits 0-9 and letters A-F, and is popular for representing binary data compactly, such as in color codes and memory addresses. Octal (base 8) uses digits 0-7 and was common in early computing. Each system is just a different way of grouping and reading the same underlying binary values.
When converting decimal to binary by division, remember the result reads from the last remainder to the first, that is, bottom to top.
The rightmost binary digit is always 20 = 1, not the leftmost. Double-check your position numbering before multiplying.
Binary numbers can only contain 0 and 1. Any other digit, such as 2 or 9, is not a valid binary number and will produce an error.
Leading zeros do not change the value, so 0101 and 101 both equal 5 in decimal, though fixed-width systems like bytes often keep them for consistency.
Understanding binary and decimal conversion builds a strong foundation for programming, networking and digital electronics. Use the calculator above to convert numbers instantly in either direction, follow the step-by-step working to learn the method by hand, and refer back to the tables whenever you need a quick reference.