Binary To Decimal
Reverse Conversion
How This Converter Works
Converts an unsigned binary integer to a base-10 integer and reports the count of valid binary digits.
Formula or rule
After removing whitespace and underscores, parse a string matching only 0 and 1 as base 2; the digit count is the number of those binary characters.
Example
- Input
- 11010110
- Calculation
- 1×128 + 1×64 + 0×32 + 1×16 + 0×8 + 1×4 + 1×2 + 0×1 = 214.
- Result
- 214