1. A data processing system comprising: a memory (A, B, TG) for storing data; an input/output circuit (IO) for performing at least one of the operation of writing data in said memory and the operation of reading data from said memory; an arithmetic circuit ( 12, 12 a, 12 b ) for arithmetics by using the data stored in said memory; and a control circuit (CNT, 13, 13 A, 13 B) for controlling the operations of said memory, said input/output circuit and said arithmetic circuit, wherein said arithmetic circuit has: a function to calculate the updated value of the output value of a neuron, which is stored in said memory, by using said neuron output value and the connection weight between neurons; and a function to calculate the distance (or similarity) between the desired value of the neuron output value stored in said memory and the neuron output value obtained.