binaryToDenary

Converts a binary number from string into denary

binaryToDenary
(
string bin
)

Examples

assert("1001".binaryToDenary == 9);

Meta