Method and apparatus for writing data to a storage array, such as but not
limited to an STRAM or RRAM memory array, using a read-mask-write
operation. In accordance with various embodiments, a first bit pattern
stored in a plurality of memory cells is read. A second bit pattern is
stored to the plurality of memory cells by applying a mask to selectively
write only those cells of said plurality corresponding to different bit
values between the first and second bit patterns.