print as a base 10 number



If you have a string of a few hundred ones and zeros that represents a
binary number, what is the best way to print this as a base 10 number?

Thanks.

.