def rotate_left(num: int, num_size: int, shift_bits: int) -> int:
    """
    Rotate a number num of num_size bits by shift_bits bits. See
    https://en.wikipedia.org/wiki/Bitwise_operation#Rotate_no_carry for more information.

    :param num: the number to rotate
    :param num_size: the size of the number in bits
    :param shift_bits: the number of bits the number is rotated by
    :return: the rotated number
    """
    mask = (2 ** shift_bits - 1) << (num_size - shift_bits)
    bits = (num & mask) >> (num_size - shift_bits)
    num = (num << shift_bits) & (2 ** num_size - 1)
    num |= bits
    return num