def is_floor_valid(binary):
    """
    Checks whether the binary representation of a floor is valid.
    The upper six bits represent the radiation generators,
    the lower six bits the corresponding microchips
    """
    chips = binary & 127
    gens = binary // 128
    mod_chip = chips & (127 - gens)  # NAND
    if mod_chip and gens:
        return False
    return True