Convert from Binary to Decimal
To convert a number from binary to decimal, each digit has to be multiplied by the base a power of the place of the digit starting from right. The decimal number is the sum of these factors.
Example: 0b01001101 => decimal
0 * 2^7 + 1 * 2^6 + 0 * 2^5 + 0 * 2^4 + 1 * 2^3 + 1 * 2^2 + 0 * 2^1 + 1 * 2^0 =
2^6 + 2^3 + 2^2 + 2^0 =
64 + 8 + 4 + 1 =
77 (= 0b01001101)