Write driver 60 buffers the data stored in X-register 54 and writes to the memory cell of the corresponding entry through corresponding bit line pair BLP. Arithmetic/logic operation circuit 50 can execute operations including addition (ADD), logical product (AND), logical sum (OR), exclusive OR (EXOR), inversion (NOT) and the like, and the contents of operation are set by a control signal (not sho