From right to left, starting from the last bit, multiply each binary number by the corresponding power of 2, and then sort it as 0, 1, 2. ...
The result of multiplying the number of the nth bit (0 or 1) by the power of 2 is the answer.
The general formula is ABCD. EFG(2)= D * 2 0+C * 2 1+B * 2 2+A * 2 3+E * 2-65438+F * 2-2+G * 2-3。
For example:1101.01(2) =1* 21+1* 2.
Or, first write the binary number as a weighted coefficient expansion, and then sum it according to the decimal addition rule. This practice is called "weighted addition".
For example:11kloc-0/= 8+4+0+1=13.
For another example, the binary number 1000 1 10 can be converted into decimal numbers as follows:
There are three 1 in the number * *, that is, one in the second place, one in the third place and one in the seventh place, and then it corresponds to a decimal number, that is, the 0 th power of 65438+2 +2+6 th power of 2, that is,
1000 1 10=64+0+0+0+4+2+0=70
Binary/Decimal Number Conversion Table
Decimal value 012345678911112.
Binary value 000110111111. 00 10 10 1 1 1 100