Binary to Decimal Converter
Calculate binary decimal instantly with our math tool. Shows detailed work, formulas used, and multiple solution methods.
Reviewed by Manoj Kumar, Mathematics Educator
Formula
Decimal = sum of (bit x 2^position) for each binary digit
Each binary digit (0 or 1) is multiplied by 2 raised to the power of its position, counting from 0 on the right. The results are summed to produce the decimal equivalent.
Worked Examples
Example 1: 8-bit Binary to Decimal
Problem:Convert the binary number 11010110 to decimal.
Solution:Position values from right to left:\n1 x 2^7 = 128\n1 x 2^6 = 64\n0 x 2^5 = 0\n1 x 2^4 = 16\n0 x 2^3 = 0\n1 x 2^2 = 4\n1 x 2^1 = 2\n0 x 2^0 = 0\nSum: 128 + 64 + 0 + 16 + 0 + 4 + 2 + 0 = 214
Result:11010110 (binary) = 214 (decimal) = D6 (hex)
Example 2: Binary IP Address Octet
Problem:Convert the binary value 11000000 (first octet of 192.168.x.x) to decimal.
Solution:1 x 128 = 128\n1 x 64 = 64\n0 x 32 = 0\n0 x 16 = 0\n0 x 8 = 0\n0 x 4 = 0\n0 x 2 = 0\n0 x 1 = 0\nSum: 128 + 64 = 192\nThis confirms the first octet of the common private IP range.
Result:11000000 = 192 (the start of the 192.168.x.x private range)
Frequently Asked Questions
What is the binary number system and why do computers use it?
The binary number system (base-2) uses only two digits: 0 and 1. Computers use binary because digital electronic circuits have two stable states: on (represented as 1) and off (represented as 0). These states are easy to distinguish electrically, making binary highly reliable for data processing and storage. Every piece of data in a computer, from text and images to videos and software, is ultimately represented as sequences of binary digits (bits). While humans find decimal more intuitive, binary is the natural language of digital hardware. Understanding binary is essential for computer science, networking, and any field involving digital technology.
How do you convert decimal to binary?
To convert decimal to binary, repeatedly divide the number by 2 and record the remainders. Read the remainders from bottom to top to get the binary number. For example, converting 214: 214 divided by 2 = 107 remainder 0, 107 divided by 2 = 53 remainder 1, 53 divided by 2 = 26 remainder 1, 26 divided by 2 = 13 remainder 0, 13 divided by 2 = 6 remainder 1, 6 divided by 2 = 3 remainder 0, 3 divided by 2 = 1 remainder 1, 1 divided by 2 = 0 remainder 1. Reading bottom to top: 11010110. You can verify by converting back to decimal. This division method works for any positive integer.
How does binary relate to hexadecimal and octal?
Binary, hexadecimal, and octal are related because their bases are all powers of 2. Hexadecimal (base 16 = 2^4) maps each digit to exactly 4 binary digits, and octal (base 8 = 2^3) maps each digit to exactly 3 binary digits. This makes conversion between these bases trivial. To convert binary 11010110 to hex, group into fours from right: 1101 0110 = D6. For octal, group into threes: 11 010 110 = 326. These groupings make hex and octal convenient shorthands for binary. Hexadecimal is most common in modern computing because it aligns with byte boundaries (2 hex digits = 1 byte), while octal was historically used in older Unix systems.
What are binary arithmetic operations?
Binary arithmetic follows simple rules. For addition: 0+0=0, 0+1=1, 1+0=1, 1+1=10 (carry 1). For subtraction, borrowing works like decimal but in base 2. Multiplication is straightforward since you only multiply by 0 or 1. Binary shifts are special operations: left shift (adding a 0 on the right) multiplies by 2, and right shift (removing the rightmost bit) divides by 2. Logical operations AND, OR, XOR, and NOT operate on individual bits and are fundamental to computer processing. These operations are executed directly by hardware circuits called logic gates, making them extremely fast and efficient.
References
Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy