Back to Home

Binary to Decimal Calculator

Convert between binary and decimal instantly, with full step-by-step working.

Result
10
Binary → Decimal
Binary: 1010
Decimal: 10
Bit Count: 4 bits

Binary uses only digits 0 and 1.

Step-by-Step Working

Complete Binary to Decimal Calculator Guide 2025

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.

Quick Fact: Binary is also called base 2, because it only uses two digits. Decimal is base 10, since it uses ten digits, 0 through 9.

What Is the Binary Number System?

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.

Binary to Decimal Formula

To convert binary to decimal, multiply each digit by its place value (a power of 2) and add the results together.

  1. Write the binary number and label each digit's position from right (position 0) to left.
  2. Multiply each digit by 2 raised to the power of its position.
  3. Add all the results together to get the decimal value.

Example: convert 1010 to decimal.
1010 = (1×23) + (0×22) + (1×21) + (0×20)
= 8 + 0 + 2 + 0 = 10

Quick Tip: Memorize the first few powers of 2: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024. They cover almost every conversion you will do by hand.

Decimal to Binary Formula

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

Binary to Decimal Conversion Table

DecimalBinaryDecimalBinary
0081000
1191001
210101010
3111610000
410032100000
5101641000000
611012810000000
711125511111111

Worked Examples

Example 1: Binary to Decimal

Convert 11001 to decimal.
11001 = (1×24) + (1×23) + (0×22) + (0×21) + (1×20)
= 16 + 8 + 0 + 0 + 1 = 25

Example 2: Decimal to Binary

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

Example 3: A Larger Number

Convert 11111111 (8 ones) to decimal.
This is the maximum value for one byte: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255

Why Computers Use Binary

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 Arithmetic Basics

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.

Bits, Bytes and Common Sizes

UnitSizeMax Decimal Value
1 bit1 binary digit0 – 1
1 nibble4 bits0 – 15
1 byte8 bits0 – 255
16-bit2 bytes0 – 65,535
32-bit4 bytes0 – 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.

Binary in Everyday Technology

  • IP addresses: Each part of an IPv4 address is really a byte, an 8-bit binary number from 0 to 255.
  • Color codes: RGB colors combine three bytes, one each for red, green and blue, from 0 to 255.
  • File permissions: Unix systems represent read, write and execute permissions as binary flags.
  • Digital electronics: Logic gates and circuits operate directly on binary signals, high or low voltage.
  • Data storage: Every file on a disk is ultimately a sequence of binary bits.

Binary in Programming Languages

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.

Other Number Systems You Might Encounter

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.

Common Mistakes When Converting

1. Reading Remainders in the Wrong Order

When converting decimal to binary by division, remember the result reads from the last remainder to the first, that is, bottom to top.

2. Mixing Up Place Values

The rightmost binary digit is always 20 = 1, not the leftmost. Double-check your position numbering before multiplying.

3. Entering Invalid Digits

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.

4. Forgetting Leading Zeros

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.

Note: This calculator works with whole, non-negative binary and decimal numbers. It does not currently handle negative numbers, fractions or other bases like hexadecimal.

Conclusion

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.

Binary to Decimal: Frequently Asked Questions

How do I convert binary to decimal by hand?
Multiply each binary digit by its place value (a power of 2, based on its position from the right) and add the results together. For example, 101 = (1×4) + (0×2) + (1×1) = 5.
How do I convert decimal to binary by hand?
Repeatedly divide the decimal number by 2, recording each remainder. Reading the remainders from bottom to top gives the binary number.
What is the largest number an 8-bit binary can represent?
An 8-bit binary number (a byte) can represent decimal values from 0 to 255, since 28 gives 256 possible combinations.
Can this calculator convert negative numbers?
No, this tool currently supports whole, non-negative binary and decimal numbers only.
Why do computers use binary instead of decimal?
Computer hardware is built from switches that are either on or off, which naturally matches the two digits of binary, making it simpler and more reliable to build circuits around.