How to Convert from Binary to Decimal - شهية الطبخ المغربي
7

# How to Convert from Binary to Decimal The binary (base two) numeral system has two possible values, often represented as 0 or 1, for each place-value. In contrast, the decimal (base ten) numeral system has ten possible values (0,1,2,3,4,5,6,7,8, or 9) for each place-value.
To avoid confusion while using different numeral systems, the base of each individual number may be specified by writing it as a subscript of the number. For example, the binary number 10011100 may be specified as "base two" by writing it as 100111002. The decimal number 156 may be written as 15610 and read as "one hundred fifty-six, base ten".
Since the binary system is the internal language of electronic computers, serious computer programmers should understand how to convert from binary to decimal. Converting in the opposite direction, from decimal to binary, is often more difficult to learn first.
Note: This is ONLY for counting and does not talk about ASCII translations.

### Positional notation method

1. 1
For this example, let's convert the binary number 110112 to decimal. List the powers of two from right to left. Start at 20, evaluating it as "1". Increment the exponent by one for each power. Stop when the amount of elements in the list is equal to the amount of digits in the binary number. The example number, 10011011, has eight digits, so the list, to eight elements, would look like this: 128, 64, 32, 16, 8, 4, 2, 1

2. 2
Write first the binary number below the list.

3. 3
Draw lines, starting from the right, connecting each consecutive digit of the binary number to the power of two that is next in the list above it. Begin by drawing a line from the first digit of the binary number to the first power of two in the list above it. Then, draw a line from the second digit of the binary number to the second power of two in the list. Continue connecting each digit with its corresponding power of two.

4. 4
Move through each digit of the binary number. If the digit is a 1, write its corresponding power of two below the line, under the digit. If the digit is a 0, write a 0 below the line, under the digit.

5. 5
Add the numbers written below the line. The sum should be 155. This is the decimal equivalent of the binary number 10011011. Or, written with base subscripts:

6. 6
Repetition of this method will result in memorization of the powers of two, which will allow you to skip step 1.

### Doubling method

1. 1
This method does not use powers. As such, it is simpler for converting large numbers in your head because you only need to keep track of a subtotal.

2. 2
Start with the left-most digit of the given binary number. For each digit as you move to the right, double your previous total and add the current digit. For example, to convert 10110012 to decimal, we take the following steps:

3. 3
1011001 → 0 * 2 + 1 = 1

4. 4
1011001 → 1 * 2 + 0 = 2

5. 5
1011001 → 2 * 2 + 1 = 5

6. 6
1011001 → 5 * 2 + 1 = 11

7. 7
1011001 → 11 * 2 + 0 = 22

8. 8
1011001 → 22 * 2 + 0 = 44

9. 9
1011001 → 44 * 2 + 1 = 8910

10. 10
Like the positional notation method, this method can be modified to convert from any base to decimal. Doubling is used because the given number is of base 2. If the given number is of a different base, replace the 2 in the method with the base of the given number. For example, if the given number is in base 37, you would replace the *2 with *37. The final result will always be in decimal (base 10).

# How to Convert from Binary to Decimal The binary (base two) numeral system has two possible values, often represented as 0 or 1, for each place-value. In contrast, the decimal (base ten) numeral system has ten possible values (0,1,2,3,4,5,6,7,8, or 9) for each place-value.
To avoid confusion while using different numeral systems, the base of each individual number may be specified by writing it as a subscript of the number. For example, the binary number 10011100 may be specified as "base two" by writing it as 100111002. The decimal number 156 may be written as 15610 and read as "one hundred fifty-six, base ten".
Since the binary system is the internal language of electronic computers, serious computer programmers should understand how to convert from binary to decimal. Converting in the opposite direction, from decimal to binary, is often more difficult to learn first.
Note: This is ONLY for counting and does not talk about ASCII translations.

### Positional notation method

1. 1
For this example, let's convert the binary number 110112 to decimal. List the powers of two from right to left. Start at 20, evaluating it as "1". Increment the exponent by one for each power. Stop when the amount of elements in the list is equal to the amount of digits in the binary number. The example number, 10011011, has eight digits, so the list, to eight elements, would look like this: 128, 64, 32, 16, 8, 4, 2, 1

2. 2
Write first the binary number below the list.

3. 3
Draw lines, starting from the right, connecting each consecutive digit of the binary number to the power of two that is next in the list above it. Begin by drawing a line from the first digit of the binary number to the first power of two in the list above it. Then, draw a line from the second digit of the binary number to the second power of two in the list. Continue connecting each digit with its corresponding power of two.

4. 4
Move through each digit of the binary number. If the digit is a 1, write its corresponding power of two below the line, under the digit. If the digit is a 0, write a 0 below the line, under the digit.

5. 5
Add the numbers written below the line. The sum should be 155. This is the decimal equivalent of the binary number 10011011. Or, written with base subscripts:

6. 6
Repetition of this method will result in memorization of the powers of two, which will allow you to skip step 1.

### Doubling method

1. 1
This method does not use powers. As such, it is simpler for converting large numbers in your head because you only need to keep track of a subtotal.

2. 2
Start with the left-most digit of the given binary number. For each digit as you move to the right, double your previous total and add the current digit. For example, to convert 10110012 to decimal, we take the following steps:

3. 3
1011001 → 0 * 2 + 1 = 1

4. 4
1011001 → 1 * 2 + 0 = 2

5. 5
1011001 → 2 * 2 + 1 = 5

6. 6
1011001 → 5 * 2 + 1 = 11

7. 7
1011001 → 11 * 2 + 0 = 22

8. 8
1011001 → 22 * 2 + 0 = 44

9. 9
1011001 → 44 * 2 + 1 = 8910

10. 10
Like the positional notation method, this method can be modified to convert from any base to decimal. Doubling is used because the given number is of base 2. If the given number is of a different base, replace the 2 in the method with the base of the given number. For example, if the given number is in base 37, you would replace the *2 with *37. The final result will always be in decimal (base 10).