Cofnod E-bost: Using multiple self-sorting for switching functions in discrete multicomponent systems