A magnetic tunnel junction (MTJ) includes first and second ferromagnetic films separated by a tunnel barrier layer. One of the ferromagnetic films (often referred to as a “reference layer”) has a fixed magnetization direction, while the other ferromagnetic film (often referred to as a “free layer”) has a variable magnetization direction. For MTJs with positive tunneling magnetoresistance (TMR), if the magnetization directions of the reference layer and free layer are in a parallel orientation, electrons will more likely tunnel through the tunnel barrier layer, such that the MTJ is in a low-resistance state. Conversely, if the magnetization directions of the reference layer and free layer are in an anti-parallel orientation, electrons will less likely tunnel through the tunnel barrier layer, such that the MTJ is in a high-resistance state. Consequently, the MTJ can be switched between two states of electrical resistance, a first state with a low resistance (RP: magnetization directions of the reference layer and the free layer are parallel) and a second state with a high resistance (RAP: magnetization directions of the reference layer and the free layer are anti-parallel). It is noted that MTJs can also have a negative TMR, e.g., lower resistance for anti-parallel orientation and higher resistance for parallel orientation, and though the following description is written in the context of positive TMR based MTJs, it will be appreciated the present disclosure is also applicable to MTJs with a negative TMR.