def compute_property_state_length(num_properties):
    """
    get number of bytes required to describe state of a bunch of properties.
    two bits per property, rounded up to the nearest byte.
    :rtype: int
    """
    required_bits = 2 * num_properties
    if required_bits % 8 == 0:
        delta_to_nearest_byte = 0
    else:
        delta_to_nearest_byte = 8 - (required_bits % 8)
    total_bits = required_bits + delta_to_nearest_byte
    total_bytes = total_bits // 8
    return total_bytes