The ciliate Tetrahymena thermophila's seven mating types are defined by unique receptor-ligand pairs (Mta/Mtb). While Mta and Mtb are known to participate in a mating signal complex, how they distinguish between oneself and six non-self cell types remains unknown. AlphaFold3 predictions reveal Mta/Mtb as large glycoproteins likely derived from ancient, unisexual, intercellular adhesion molecules. Since homologous binary-type systems perform XOR by switching mtA expression, we show spectrum (n) types naturally extend XOR to multi-bit NOT EQUALS operations via differential affinities of Mta/Mtb dimers. We model kinetics begetting the 'n + 1th' type, demonstrating self-inhibition by trans-homophilic Mtb-Mtb. A computational approach reconciles recent and classical evidence for mating exclusivity, including selfing failures (same type mating). Binding kinetics enables fast, robust intercellular computation across an intermembrane mating space. Thus, Mta/Mtb families are a model system allowing us to derive a 'calculus' of antigenic variation and inspire synthetic designs of XOR logic underlying self/non-self recognition.