In accordance with one embodiment of the invention, a memory device
comprises an array of memory cells arranged into word lines and bit
lines, with a sense amplifier and a plurality of reference cells for each
bit line. The sense amplifier for a bit line compares the output of a
memory cell for that bit line with the output of one of the plurality of
reference cells for that bit line.