Ring-structured adaptable logic circuit for the classification of binary vectors