A memory used for both a field configurable RAM and a PLA, comprising a configurable memory block including a CAM block for performing an AND function of the PLA and a RAM block for selectively performing a field configurable RAM function and an OR function of the PLA, each of the CAM and RAM blocks including a plurality of basic memory blocks, each of the basic memory blocks including a plurality of CAM cells, a plurality of interconnection circuits for selectively interconnecting the basic memory blocks, an input controller for controlling a data input operation of the configurable memory block, and an output controller for controlling a data output operation of the configurable memory block. According to the present invention, the length of output data or the number of memory blocks can be adjusted with no loss in area.