Binary to Decimal Calculator — With Steps
Decimal Value
--
Step-by-Step
--
Hexadecimal
--
How Binary to Decimal Conversion Works
Binary to decimal conversion is the process of translating a base-2 number (using only digits 0 and 1) into its equivalent base-10 (decimal) value. Each position in a binary number represents a successive power of 2, starting from 2^0 (which equals 1) at the rightmost digit. According to the National Institute of Standards and Technology (NIST), positional number systems like binary and decimal follow the same mathematical principle: each digit's value equals the digit multiplied by the base raised to the power of its position.
This calculator converts any binary number to decimal instantly and shows the step-by-step positional breakdown, making it an essential learning tool for computer science students and a quick reference for programmers working with low-level data. It also displays the hexadecimal equivalent, which is commonly needed in web development and systems programming. For full multi-base conversion including octal, see our binary calculator.
The Binary to Decimal Formula
The conversion formula uses positional notation, which is the foundational principle of all number systems as defined in mathematics and computer science textbooks:
Decimal Value = b(n-1) x 2^(n-1) + b(n-2) x 2^(n-2) + ... + b(1) x 2^1 + b(0) x 2^0
Where b(i) is the binary digit at position i (counting from right, starting at 0) and n is the total number of digits.
Worked example: Convert binary 11010110 to decimal.
- Position 7: 1 x 2^7 = 1 x 128 = 128
- Position 6: 1 x 2^6 = 1 x 64 = 64
- Position 5: 0 x 2^5 = 0 x 32 = 0
- Position 4: 1 x 2^4 = 1 x 16 = 16
- Position 3: 0 x 2^3 = 0 x 8 = 0
- Position 2: 1 x 2^2 = 1 x 4 = 4
- Position 1: 1 x 2^1 = 1 x 2 = 2
- Position 0: 0 x 2^0 = 0 x 1 = 0
Sum: 128 + 64 + 0 + 16 + 0 + 4 + 2 + 0 = 214
Key Terms You Should Know
Binary (Base 2): A number system using only the digits 0 and 1. Each digit is called a bit (binary digit). Binary is used by all digital computers because electronic circuits naturally operate in two states: on and off.
Decimal (Base 10): The standard number system humans use daily, with digits 0 through 9. Each position represents a power of 10. For example, 214 = 2x100 + 1x10 + 4x1.
Bit: A single binary digit (0 or 1), the smallest unit of information in computing. The word "bit" was coined by mathematician John Tukey in 1947.
Byte: A group of 8 bits that can represent 256 different values (2^8 = 256). Bytes are the standard unit for measuring data storage capacity. One kilobyte (KB) equals 1,000 bytes; one megabyte (MB) equals 1,000,000 bytes.
Positional notation: A number representation system where each digit's contribution depends on its position. Binary, decimal, hexadecimal, and octal all use positional notation with different bases.
Common Binary Values Reference Table
Here are important binary-to-decimal conversions that appear frequently in computing, networking, and programming:
| Binary | Decimal | Hex | Significance |
|---|---|---|---|
| 00000001 | 1 | 01 | Minimum non-zero value |
| 00001010 | 10 | 0A | Newline character (LF) in ASCII |
| 01000001 | 65 | 41 | ASCII uppercase 'A' |
| 01111111 | 127 | 7F | Max signed 8-bit integer |
| 11111111 | 255 | FF | Max unsigned byte / RGB max |
| 100000000 | 256 | 100 | First value requiring 9 bits |
| 10000000000 | 1,024 | 400 | 1 kibibyte (KiB) |
Practical Examples
Example 1 -- ASCII Character Decoding: The binary sequence 01001000 01101001 represents two ASCII characters. 01001000 = 72 (letter 'H') and 01101001 = 105 (letter 'i'). Together they spell "Hi". Every text message, email, and webpage uses this type of binary-to-character mapping, with modern systems using UTF-8 encoding that extends ASCII to support all world languages.
Example 2 -- Subnet Mask Interpretation: The subnet mask 11111111.11111111.11111111.00000000 converts to 255.255.255.0 in decimal, commonly written as /24 in CIDR notation. Network engineers convert subnet masks between binary and decimal to understand which portion of an IP address identifies the network versus the host. Our IP subnet calculator automates these calculations.
Example 3 -- RGB Color Channels: A pixel color stored as 24 bits of binary data: 00011010 01010110 11011011. Converting each 8-bit segment: R=26, G=86, B=219 in decimal, which is hex #1A56DB. This is the process that every display uses to render the millions of colors you see on screen. Use our hex calculator for hex-to-decimal conversions in web development.
Tips for Learning Binary Conversion
- Memorize powers of 2 up to 2^10. The sequence 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 appears constantly in computing. Knowing these by heart makes binary conversion nearly instant for values up to 1,024.
- Use the doubling method for quick conversion. Starting from the leftmost bit, double the running total and add the current bit. For 11010110: start with 1, double+1=3, double+0=6, double+1=13, double+0=26, double+1=53, double+1=107, double+0=214. This is faster than computing individual powers of 2.
- Group bits into nibbles (4 bits). Working with 4-bit groups is easier than handling all bits at once. Each nibble converts to a single hex digit (0-F) or a decimal value from 0-15. For 11010110: split into 1101 (13, hex D) and 0110 (6, hex 6), giving D6 in hex.
- Practice with familiar values. Convert your age, phone number digits, or common numbers to binary and back. The more you practice, the more intuitive the pattern becomes.
- Use our decimal to binary calculator to verify your work. Converting in both directions reinforces your understanding of how positional notation works across number bases.
Frequently Asked Questions
Why do computers use binary instead of decimal?
Computers use binary because electronic circuits have two reliable voltage states: high (representing 1) and low (representing 0). A transistor either allows current to flow or blocks it, making binary the most natural and error-resistant way to store and process data electronically. Attempting to distinguish between 10 different voltage levels (for decimal) would introduce far more errors due to electrical noise and component variation. Modern CPUs contain billions of transistors, each operating as a binary switch, collectively performing trillions of binary operations per second. The simplicity and reliability of two-state logic is what makes modern computing possible.
What is the largest decimal number that can be stored in 8, 16, and 32 bits?
The maximum unsigned value for a given bit width is 2^n - 1, where n is the number of bits. For 8 bits: 2^8 - 1 = 255 (binary 11111111). For 16 bits: 2^16 - 1 = 65,535. For 32 bits: 2^32 - 1 = 4,294,967,295 (approximately 4.3 billion). This is why 8-bit systems (like RGB color channels) max out at 255, why 16-bit audio has 65,536 amplitude levels, and why 32-bit operating systems can address a maximum of 4 GB of RAM. Modern 64-bit systems support 2^64 - 1 = 18.4 quintillion unique values.
How do you convert decimal back to binary?
To convert decimal to binary, repeatedly divide the number by 2 and record the remainder at each step, then read the remainders from bottom to top. For example, converting 214: 214/2=107 remainder 0, 107/2=53 r1, 53/2=26 r1, 26/2=13 r0, 13/2=6 r1, 6/2=3 r0, 3/2=1 r1, 1/2=0 r1. Reading bottom to top: 11010110. You can verify by converting back: 128+64+16+4+2 = 214. Our decimal to binary calculator performs this conversion instantly with step-by-step output.
What is the difference between binary and hexadecimal?
Binary (base 2) uses two digits (0, 1) while hexadecimal (base 16) uses sixteen digits (0-9 and A-F). They are closely related because each hex digit represents exactly 4 binary bits: hex A = binary 1010, hex F = binary 1111. This makes hex a compact human-readable shorthand for binary data. For example, the 32-bit binary value 11111111000000001010101001100110 is much easier to read and remember as FF00AA66 in hex. Programmers use hex for memory addresses, color codes (#FF5733), and debugging because it is 4 times shorter than binary while maintaining a direct bit-level correspondence.
How is binary used in networking?
Every IP address is a 32-bit binary number (for IPv4) displayed in dot-decimal notation for human readability. The IP address 192.168.1.1 is actually 11000000.10101000.00000001.00000001 in binary. Subnet masks are also binary numbers where consecutive 1-bits define the network portion and 0-bits define the host portion. For example, a /24 subnet mask (255.255.255.0) is 11111111.11111111.11111111.00000000 in binary. Network engineers perform binary AND operations between IP addresses and subnet masks to determine network boundaries and routing decisions.
What is the fastest way to convert binary to decimal mentally?
The doubling method is the fastest mental technique. Start from the leftmost bit and maintain a running total: double the total and add the current bit, then move right. For binary 11010110: start with 1, double+1=3, double+0=6, double+1=13, double+0=26, double+1=53, double+1=107, double+0=214. This method requires only simple doubling and adding (0 or 1), which is much easier to do mentally than computing individual powers of 2 and summing them. With practice, you can convert 8-bit binary numbers in under 10 seconds.