def get_common_xs(entries):
    """Return a mask of where there are Xs in all routing table entries.

    For example ``01XX`` and ``XX1X`` have common Xs in the LSB only, for this
    input this method would return ``0b0001``::

        >>> from rig.routing_table import RoutingTableEntry
        >>> entries = [
        ...     RoutingTableEntry(set(), 0b0100, 0xfffffff0 | 0b1100),  # 01XX
        ...     RoutingTableEntry(set(), 0b0010, 0xfffffff0 | 0b0010),  # XX1X
        ... ]
        >>> print("{:#06b}".format(get_common_xs(entries)))
        0b0001
    """
    # Determine where there are never 1s in the key and mask
    key = 0x00000000
    mask = 0x00000000

    for entry in entries:
        key |= entry.key
        mask |= entry.mask

    # Where there are never 1s in the key or the mask there are Xs which are
    # common to all entries.
    return (~(key | mask)) & 0xffffffff