Binary To Decimal
How This Converter Works
Converts an unsigned binary integer to base 10, ignores whitespace and underscores, and reports the binary digit count.
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