An offset of the switching magnetic field of a memory layer caused by a
static magnetic field from a pinned layer in a magnetoresistive element
used as a memory element is suppressed. A first magnetic layer magnetized
perpendicularly to the film surface, an insulating layer, and a second
magnetic layer magnetized perpendicularly to the film surface form the
magnetoresistive element. The coercive force of the second magnetic layer
is higher than that of the first magnetic layer. Upon the flow of current
between the first magnetic layer and the second magnetic layer via the
insulating layer N2, the resistance changes depending on the relative
angle in magnetization between the two magnetic layers. A magnetic field
applied from the second magnetic layer 2 to the first magnetic layer 1 is
set smaller than the coercive force of the first magnetic layer 1.