from typing import Tuple


def get_sweep_time_ascii(
    data: str, sweep_b: Tuple[int, int], time_b: Tuple[int, int]
) -> Tuple[int, int]:
    """Get sweep and time from a given ASCII string.

    :param data: ASCII string
    :param sweep_b: Boundaries of sweep
    :param time_b: Boundaries of time

    :return: sweep, time
    """
    sweep_val = int(data[sweep_b[0] : sweep_b[1]], 2)
    time_val = int(data[time_b[0] : time_b[1]], 2)
    return sweep_val, time_val