def get_mask(k: int, c: int) -> int:
    """Returns the mask value to copy bits inside a single byte.

    :param k: The start bit index in the byte.
    :param c: The number of bits to copy.

    Examples of returned mask:

        Returns                Arguments
        00001111               k=0, c=4
        01111100               k=2, c=5
        00111100               k=2, c=4
    """
    if k == 0:
        return (1 << c) - 1
    return (1 << ((k + 1 + c) - 1)) - (1 << ((k + 1) - 1))