Loading Calculator...
Please wait a moment
Please wait a moment
Convert binary numbers (base-2) to decimal numbers (base-10) instantly. Essential for programming, computer science, digital electronics, and networking.
| Binary | Decimal | Context |
|---|---|---|
| 0 | 0 | Zero / False / Off |
| 1 | 1 | One / True / On |
| 10 | 2 | Two states beyond on/off |
| 11 | 3 | Maximum 2-bit value |
| 100 | 4 | Nibble boundary start |
| 101 | 5 | Common in examples |
| 110 | 6 | Six in binary |
| 111 | 7 | Maximum 3-bit value |
| 1000 | 8 | 1 byte = 8 bits |
| 1001 | 9 | Nine in binary |
| 1010 | 10 | Ten in binary (0xA) |
| 1100 | 12 | Twelve in binary (0xC) |
| 1111 | 15 | Maximum nibble value (0xF) |
| 10000 | 16 | Hexadecimal base (0x10) |
| 100000 | 32 | ASCII space character |
| 1000000 | 64 | 64-bit computing reference |
| 1111111 | 127 | Max signed 8-bit integer |
| 10000000 | 128 | Bit 7 set |
| 11111111 | 255 | Max unsigned byte value |
| 100000000 | 256 | One more than a byte |
Binary (base-2) is a number system that uses only two digits: 0 and 1. It is the fundamental language of computers and digital electronics. Each digit in a binary number is called a "bit" (binary digit), and computers use binary because electronic circuits can easily represent two states: on (1) or off (0).
The binary system was formally described by Gottfried Wilhelm Leibniz in 1703, though earlier examples exist in ancient Indian and Chinese mathematics. The word "binary" comes from the Latin binarius, meaning "consisting of two." Today, every piece of digital data -- from text and images to music and video -- is ultimately stored and processed as sequences of binary digits.
In binary, place values increase by powers of 2 from right to left, just as decimal place values increase by powers of 10. The rightmost position is 20 (1), the next is 21 (2), then 22 (4), 23 (8), and so on. Understanding this positional notation is the key to converting binary numbers to their decimal equivalents.
| Feature | Binary (Base-2) | Decimal (Base-10) |
|---|---|---|
| Digits used | 0, 1 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 |
| Place value multiplier | Powers of 2 | Powers of 10 |
| Primary use | Computers and electronics | Everyday human counting |
| Example: thirteen | 1101 | 13 |
To convert a binary number to decimal, multiply each bit by 2 raised to its positional power (counting from right to left, starting at 0), then sum all the results. The formula is:
Decimal = bn × 2n + bn-1 × 2n-1 + ... + b1 × 21 + b0 × 20
1 × 23 = 1 × 8 = 8
0 × 22 = 0 × 4 = 0
1 × 21 = 1 × 2 = 2
1 × 20 = 1 × 1 = 1
Total: 8 + 0 + 2 + 1 = 11
1 × 27 = 128
1 × 26 = 64
0 × 25 = 0
1 × 24 = 16
0 × 23 = 0
1 × 22 = 4
1 × 21 = 2
0 × 20 = 0
Total: 128 + 64 + 0 + 16 + 0 + 4 + 2 + 0 = 214
1 × 27 = 128
0 × 26 = 0
0 × 25 = 0
0 × 24 = 0
0 × 23 = 0
0 × 22 = 0
0 × 21 = 0
0 × 20 = 0
Total: 128
A fast way to convert binary to decimal without calculating powers of 2 is the doubling method. Start from the leftmost bit and work right: double your running total and add the next bit.
Example: Convert 1101 using the doubling method
Start: 0
Bit 1: (0 × 2) + 1 = 1
Bit 1: (1 × 2) + 1 = 3
Bit 0: (3 × 2) + 0 = 6
Bit 1: (6 × 2) + 1 = 13
| Bits | Max Unsigned Value | Total Possible Values |
|---|---|---|
| 1 | 1 | 2 |
| 2 | 3 | 4 |
| 3 | 7 | 8 |
| 4 | 15 | 16 |
| 5 | 31 | 32 |
| 6 | 63 | 64 |
| 7 | 127 | 128 |
| 8 | 255 | 256 |
| 10 | 1,023 | 1,024 |
| 16 | 65,535 | 65,536 |
| 32 | 4,294,967,295 | 4,294,967,296 |
| Description | Decimal | Binary |
|---|---|---|
| ASCII 'A' | 65 | 01000001 |
| ASCII 'a' | 97 | 01100001 |
| ASCII '0' | 48 | 00110000 |
| HTTP port | 80 | 01010000 |
| HTTPS port | 443 | 110111011 |
| 1 KB (bytes) | 1024 | 10000000000 |
Understanding binary is essential for low-level programming, bit manipulation, bitwise operators, and debugging memory-level issues in any programming language.
Logic gates, flip-flops, and integrated circuits all operate using binary signals. Converting between binary and decimal is critical for circuit design and analysis.
IP addresses, subnet masks, and network protocols rely on binary representation. Subnetting calculations require fluent conversion between binary and decimal.
Encryption algorithms work with binary data through operations like XOR, bit shifting, and rotation. Secure protocols depend on binary number manipulation.
Always assign powers of 2 starting from the rightmost digit (position 0). A common mistake is starting from the left, which reverses all the positional values and produces an incorrect result.
Binary numbers only contain 0s and 1s. If you see a 2, 3, or any other digit, the number is not binary. This is a common data-entry error.
Numbers like 1010 could be binary (10 in decimal), octal (520 in decimal), or just a decimal number. Always confirm the base before converting. Look for prefixes like 0b (binary), 0o (octal), or 0x (hexadecimal).
Leading zeros do not change the decimal value (00001010 = 1010 = 10), but they indicate byte alignment. In computing, 8-bit, 16-bit, and 32-bit values are often padded with leading zeros for clarity and alignment.
Instead of computing each power of 2 separately, use the doubling method: start with the leftmost bit, double your running total and add the next bit. This is much faster for mental math.
Knowing that 28 = 256, 210 = 1024, and 216 = 65536 lets you quickly estimate the decimal value of long binary numbers by identifying which power of 2 the most significant bit represents.
Computers use binary because digital circuits can easily represent two states: on (1) or off (0). This makes binary the most reliable and efficient way to store and process information electronically. Transistors, the building blocks of computer chips, work as switches that are either on or off.
With 8 bits, you can represent 256 different values (2 to the power of 8 equals 256). The range is 0 to 255 in decimal, or 00000000 to 11111111 in binary. This is why a byte (8 bits) is a fundamental unit in computing.
Decimal (base-10) uses ten digits (0-9) and powers of 10 for place values. Binary (base-2) uses only two digits (0 and 1) and powers of 2 for place values. While decimal is intuitive for humans, binary is more efficient for computers.
A bit is a single binary digit (0 or 1). A byte is a group of 8 bits. Bytes are the standard unit for measuring computer memory and storage. For example, 1 kilobyte (KB) equals 1,024 bytes, and 1 megabyte (MB) equals 1,024 KB.
Yes, computers represent negative numbers using systems like two's complement. In two's complement, the leftmost bit indicates the sign (0 for positive, 1 for negative), and the remaining bits represent the magnitude. This allows computers to perform arithmetic operations efficiently.
In networking, binary is used to represent IP addresses, subnet masks, and MAC addresses. For example, the IPv4 address 192.168.1.1 is actually four groups of 8-bit binary numbers. Understanding binary is essential for subnetting calculations and network configuration.
For large binary numbers, group the digits from right to left and calculate each group separately. You can also use the doubling method: start from the leftmost bit, double the running total and add the next bit, repeating until all bits are processed. This avoids calculating large powers of 2.
Binary uses base-2 (digits 0-1) while hexadecimal uses base-16 (digits 0-9 and A-F). Hexadecimal is a shorthand for binary since each hex digit represents exactly 4 binary digits. For instance, the hex value FF equals the binary value 11111111, which is 255 in decimal.
Cryptography relies on binary because encryption algorithms perform bitwise operations such as XOR, shifting, and rotation on binary data. Understanding binary is essential for working with encryption keys, hash functions, and secure communication protocols.
Modern computers typically use 64-bit processors, meaning they can process 64 binary digits in a single operation. This allows them to address up to 18.4 quintillion bytes of memory and handle very large numbers natively, compared to older 32-bit systems that were limited to about 4 GB of addressable memory.
This binary to decimal converter is provided for educational and informational purposes. While we strive for accuracy, always verify critical calculations independently. Results should not be used as the sole basis for professional or engineering decisions.