def one_at(pos, size=8):
    """
    Create a size-bit int which only has one '1' bit at specific position.

    example:

    one_at(0) -> 0b10000000
    one_at(3) -> 0b00010000
    one_at(5, 10) -> 0b0000010000

    :param int pos: Position of '1' bit.
    :param int size: Length of value by bit.
    :rtype: int
    """
    assert 0 <= pos < size
    return 1 << (size - 1 - pos)