Convert instantly between binary (base-2) and decimal (base-10) number systems. Enter a binary number to see its decimal equivalent, or enter a decimal number to see its binary representation. Every result includes a full positional breakdown, step-by-step calculation, and a detailed explanation of how the conversion works.
Binary to Decimal Calculator
Enter a binary number (digits 0 and 1 only). The calculator converts it to its decimal equivalent using positional weighting of powers of 2.
Decimal to Binary Calculator
Enter a whole decimal number (non-negative integer). The calculator converts it to binary using repeated division by 2, showing every division step.
Binary and Decimal Reference Table
| Decimal | Binary | Powers of 2 |
|---|---|---|
| 0 | 0 | — |
| 1 | 1 | 2⁰ |
| 2 | 10 | 2¹ |
| 3 | 11 | 2¹ + 2⁰ |
| 4 | 100 | 2² |
| 5 | 101 | 2² + 2⁰ |
| 6 | 110 | 2² + 2¹ |
| 7 | 111 | 2² + 2¹ + 2⁰ |
| 8 | 1000 | 2³ |
| 10 | 1010 | 2³ + 2¹ |
| 15 | 1111 | 2³ + 2² + 2¹ + 2⁰ |
| 16 | 10000 | 2⁴ |
| 32 | 100000 | 2⁵ |
| 64 | 1000000 | 2⁶ |
| 100 | 1100100 | 2⁶ + 2⁵ + 2² |
| 127 | 1111111 | 2⁶ − 1 (all ones) |
| 128 | 10000000 | 2⁷ |
| 255 | 11111111 | 2⁸ − 1 (8-bit max) |
| 256 | 100000000 | 2⁸ |
| 512 | 1000000000 | 2⁹ |
| 1000 | 1111101000 | 10-bit representation |
| 1024 | 10000000000 | 2¹⁰ |
Binary and decimal are two of the most important number systems in mathematics and computing. The decimal system, which uses ten digits (0 through 9), is the system humans have used for everyday counting and arithmetic for thousands of years. The binary system, which uses only two digits (0 and 1), is the foundation of all modern digital technology. Every piece of data stored, processed, or transmitted by a computer — every image, every word, every calculation — is ultimately represented as a sequence of binary digits.
What is the Binary Number System?
The binary number system is a positional number system with a base of 2. This means that the value of each digit in a binary number depends on its position, and each position represents a power of 2 rather than a power of 10. Starting from the rightmost digit (which represents 2 to the power of 0, or 1), each successive position to the left represents the next higher power of 2: 1, 2, 4, 8, 16, 32, 64, 128, and so on. Each individual digit in a binary number is called a bit, which is a contraction of the phrase binary digit.
The binary system was formally introduced into mathematics by the German philosopher and mathematician Gottfried Wilhelm Leibniz in the late 17th century, though he found inspiration in the ancient Chinese I Ching, which used a system of broken and unbroken lines. Binary became the foundation of modern computing because electronic circuits can represent two states naturally and reliably — on and off, high voltage and low voltage, magnetised and demagnetised — corresponding to 1 and 0.
How to Convert Binary to Decimal
Converting a binary number to decimal uses the positional value method. Each bit of the binary number is multiplied by its corresponding power of 2 (based on its position from the right, starting at position 0), and all the results are added together.
Positions (right to left): 7 6 5 4 3 2 1 0
Values: 1×2⁷ + 1×2⁶ + 0×2⁵ + 1×2⁴ + 0×2³ + 1×2² + 1×2¹ + 0×2⁰
= 128 + 64 + 0 + 16 + 0 + 4 + 2 + 0
= 214
The key insight is that each binary digit either contributes its positional power of 2 to the total (if the bit is 1) or contributes nothing (if the bit is 0). This means you only need to sum the powers of 2 that correspond to bit positions containing a 1.
How to Convert Decimal to Binary
Converting a decimal number to binary uses the repeated division method. The decimal number is repeatedly divided by 2, and the remainder of each division (which is always either 0 or 1) is recorded. When all the divisions are complete, the binary number is read from the remainders in reverse order — from the last remainder to the first.
214 ÷ 2 = 107 remainder 0
107 ÷ 2 = 53 remainder 1
53 ÷ 2 = 26 remainder 1
26 ÷ 2 = 13 remainder 0
13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Read remainders bottom to top: 11010110
Why Binary Matters in Computing
Modern computers store and process all data in binary form. A single bit can represent either 0 or 1. Eight bits make one byte, which can represent 256 different values (2 to the power of 8). A kilobyte is 1,024 bytes (2 to the power of 10). A megabyte is 1,048,576 bytes (2 to the power of 20). A gigabyte is 1,073,741,824 bytes (2 to the power of 30). Understanding binary arithmetic is essential for computer scientists, programmers, and engineers working with data storage, networking, cryptography, and digital logic design.
Binary is also the basis of other common number systems in computing. Hexadecimal (base-16) groups four binary bits into a single digit, making it a more compact way to represent binary data. Octal (base-8) groups three binary bits. Colour codes in web design are written in hexadecimal, with each pair of hexadecimal digits representing one byte of colour information for red, green, and blue channels. IPv4 network addresses are groups of four decimal numbers, each representing one byte of a 32-bit binary address.