Question

Write a function to convert binary to decimal?

Login to Submit

Examples

Please note the argument b will be string

Input: "111"
Output: 7

Input: "1010"
Output: 10

Input: "111000"
Output: 56