How Do You Convert Binary to Decimal?
Binary is a base 2 system that uses only the digits 0 and 1, while decimal is the base 10 system you use every day. To convert binary to decimal, you add up the place value of each 1 in the number. This page gives you the formula, both manual methods, a full conversion chart, and the byte, fraction, and signed cases.
What Are Binary and Decimal Number Systems?
Every number system has a base. The base sets how many digit symbols the system uses and how the place values grow from one column to the next. Binary uses base 2 and decimal uses base 10. Converting between them does not change the value itself, it only rewrites the same value using a different base. The two sections below explain each system.
What Is the Binary Number System (Base 2)?
Binary is a base 2 system that uses only two digits, 0 and 1. Each digit is called a bit. Each position is worth a power of 2, and the value doubles every step you move to the left. Binary is the language of computers because a circuit is either off, which reads as 0, or on, which reads as 1. With only two states to detect, it is the most reliable way for hardware to store and move data.
What Is the Decimal Number System (Base 10)?
Decimal is the base 10 system that people use every day. It uses ten digits, 0 to 9. Each position is worth a power of 10, so the columns are ones, tens, hundreds, thousands, and so on. Binary works in the exact same way, the only difference is that it uses powers of 2 instead of powers of 10. Once you see decimal as a set of place values, binary becomes easy to read.
How Does Place Value Work in a Binary Number?
You read place value from the right. The rightmost bit is worth 1, which is 2 to the power of 0. The next bit to the left is worth 2, then 4, then 8, then 16, doubling at each step. The rightmost bit is called the least significant bit, or LSB, because it carries the smallest value. The leftmost bit is the most significant bit, or MSB, because it carries the largest. For example, in the binary number 1011 the weights above the digits are 8, 4, 2, and 1. Knowing these weights is all you need to convert any binary number.
What Is the Formula to Convert Binary to Decimal?
To convert binary to decimal, multiply each bit by 2 raised to the power of its position, counting from the right and starting at 0, then add the products.
decimal = sum of (bit x 2 to the power of position)
The reason it works is simple. Each 1 adds its place value to the total, and each 0 adds nothing. So the decimal value is just the sum of the place values where a 1 sits.
How Do You Convert Binary to Decimal Step by Step?
Take the binary number 1011.
1. Write the place values above the bits: 8, 4, 2, 1.
2. Multiply each bit by its weight: 8, 0, 2, 1.
3. Add the products: 8 plus 0 plus 2 plus 1.
The result is 11, so 1011 in binary equals 11 in decimal.
How Do You Convert Binary to Decimal Using the Doubling Method?
The doubling method, also called double dabble, is faster for long numbers because it does not use powers of 2. Start with a total of 0, then read the bits from the left. For each bit, double the running total and add that bit.
Using 1011 again: 0 doubled plus 1 is 1. 1 doubled plus 0 is 2. 2 doubled plus 1 is 5. 5 doubled plus 1 is 11. The answer is 11, the same result as the place value method.
How Do You Convert an 8-Bit Binary Number (a Byte) to Decimal?
Eight bits make one byte, which is the most common size you will meet. The place values of a byte, from left to right, are 128, 64, 32, 16, 8, 4, 2, and 1. If every bit is 1, the number 11111111 adds up to 255, which is the largest value a single byte can hold. For a mixed example, 01101011 has 1s in the 64, 32, 8, 2, and 1 columns, so it equals 64 plus 32 plus 8 plus 2 plus 1, which is 107. A byte can store 256 different values, from 0 to 255.
How Do You Convert a Binary Fraction to Decimal?
A binary number can have a point, just like a decimal number. The digits after the point use negative powers of 2. The first digit is worth one half, the next is one quarter, then one eighth, and so on. Convert the whole part and the fraction part on their own, then add them. For example, 0.101 is (1 times one half) plus (0 times one quarter) plus (1 times one eighth), which is 0.5 plus 0 plus 0.125, equal to 0.625. Keeping the two parts separate makes the work easy to follow.
How Do You Convert a Negative (Signed) Binary Number to Decimal?
To store negative numbers, computers use a method called two's complement. In this method the leftmost bit is the sign bit. A 0 means the number is positive, and a 1 means it is negative. To read a negative value, invert all the bits, add 1, convert that result to decimal, then place a minus sign in front. The same eight bits mean different things depending on the type. As an unsigned byte the range is 0 to 255, but as a signed byte the range is minus 128 to 127. Always check which type you are working with, because the same pattern can stand for two different values.
What Is the Binary to Decimal Conversion Chart?
Use the chart below to read values quickly instead of working them out each time. It lists the binary value, the decimal result, and the hexadecimal form, since hex is a common shorthand for binary. The chart covers the nibble values from 0 to 15 and a set of common byte values. When you store a value in a byte, you can pad it with leading zeros to fill all eight bits.
Binary | Decimal | Hex |
0000 | 0 | 0 |
0001 | 1 | 1 |
0010 | 2 | 2 |
0011 | 3 | 3 |
0100 | 4 | 4 |
0101 | 5 | 5 |
0110 | 6 | 6 |
0111 | 7 | 7 |
1000 | 8 | 8 |
1001 | 9 | 9 |
1010 | 10 | A |
1011 | 11 | B |
1100 | 12 | C |
1101 | 13 | D |
1110 | 14 | E |
1111 | 15 | F |
00010000 | 16 | 10 |
00100000 | 32 | 20 |
01000000 | 64 | 40 |
01100100 | 100 | 64 |
10000000 | 128 | 80 |
11001000 | 200 | C8 |
11111111 | 255 | FF |
What Are the Most Common Binary to Decimal Values?
These are the values people look up most often, each shown as a quick fact. The one worth remembering is 11111111, which equals 255, the top value of a single byte.
binary 1 | 1 decimal |
binary 10 | 2 decimal |
binary 100 | 4 decimal |
binary 101 | 5 decimal |
binary 1000 | 8 decimal |
binary 1010 | 10 decimal |
binary 1111 | 15 decimal |
binary 10000 | 16 decimal |
binary 10000000 | 128 decimal |
binary 11111111 | 255 decimal |
Where Is Binary to Decimal Conversion Used?
You meet this conversion any time you work close to how computers store data.
• In computing, hardware reads each bit as off or on, and binary to decimal turns those bits into numbers people can read.
• In digital electronics, sensor outputs and logic states arrive as binary and are read as decimal values.
• In networking, IPv4 addresses and subnet masks are handled in binary. The mask 11111111.11111111.11111111.00000000 is the same as 255.255.255.0.
• In programming, binary to decimal helps with bitwise operations, flags, and debugging raw values.
• In data encoding, systems like ASCII and Unicode store each character as binary, and converting to decimal helps you read the codes.
How Does Binary to Decimal Conversion Connect to Other Number Systems?
Binary to decimal is one link in a wider set of number system conversions. Binary, octal, decimal, and hexadecimal all describe the same values, they just use different bases. Octal and hexadecimal exist mainly as short ways to write long binary strings, because 8 is 2 to the power of 3 and 16 is 2 to the power of 4, so each octal digit stands for three bits and each hex digit stands for four. Once you understand how binary maps to decimal, these other systems follow the same place value idea. The pages below cover the conversions most closely linked to this one.
How Do You Convert Binary to Hexadecimal?
To convert binary to hexadecimal, split the bits into groups of four from the right, then write each group as one hex digit. This is why 11111111 becomes FF. For the full tool and chart, see the hexadecimal converter.
How Do You Convert Binary to Octal?
To convert binary to octal, split the bits into groups of three from the right, then write each group as one octal digit from 0 to 7. It uses the same shorthand idea as hexadecimal. For the full tool, see the octal converter.
What Is a Base or Radix Conversion Calculator?
A base or radix conversion calculator changes a number between any two bases, such as base 2, base 8, base 10, and base 16, in one place. It is the parent tool for every number system conversion on this site. See the base or radix converter.
How Do You Convert a Floating Point Number to Binary?
Computers store real numbers using the IEEE 754 floating point format, which splits the bits into a sign, an exponent, and a fraction. This is the same idea as the binary fraction above, set into a fixed layout. For the full tool, see the floating point converter.
How Do You Write a Number in Scientific Notation?
Scientific notation writes a number as a value times a power of ten, which is a compact way to show very large or very small numbers. It is another way of writing numbers, next to base conversion. See the scientific notation converter.
How Do You Convert Data Storage Units Like GB to MB?
Storage units build up from bits and bytes. A byte is 8 bits, and larger units such as KB, MB, and GB are multiples of the byte. For the full tool, see the GB to MB converter.