< Back

Smallest Power of 2

Write a function called largest_power(binary_string), which has one parameter: a string of binary digits. Your function should compute and return the smallest power of 2 that is greater than or equal to the integer represented by the input binary string.