Metal-oxide memristors, or resistive random access memory (RRAM) switches, in particular utilizing HfO x as the resistive switching material, have seen significant interest recently for nonvolatile memory and computation applications. [1][2][3][4][5] There has been particular interest in understanding the role of migration of oxygen atoms in determining the operation of memristors. 6-11 Similar recent advances in understanding the localized nanoscale physico-chemical changes underlying resistance switching 4,12-15 have opened up fresh interests into studying the effect of atomic movements on extended device operation and the nanoscale material behavior during eventual failure and possible techniques to mitigate such failure. [16][17][18] To enable scanning transmission x-ray microscopy (STXM) measurements, each device was built on a 200 nm low-stress Si 3 N 4 film suspended over 50 µm x 50 µm holes etched through a silicon substrate. 13 We fabricated crosspoint HfO x devices with an active area of 2 µm x 2 µm ( Figure 1a) by depositing a bottom electrode (15 nm Pt), a blanket layer of 6 nm HfO 2 , followed by the top electrode (10 nm TiN and 15 nm Pt). Typical currentvoltage plots of these devices (Figure 1b) exhibited the well-recognized resistance switching behavior, or pinched hysteresis loop, that characterizes a memristor. 19 During operation, high and low non-volatile resistance states (also called OFF and ON, respectively) were repeatedly accessed using bipolar voltage pulses. STXM experiments were performed using resonantly tuned x-ray beams mostly in the O K-edge region, with spectral resolution of ~70 meV and a beam diameter <30 nm. 20 The device was electrically connected inside the chamber of the system to enable in-situ operation and ON/OFF cycling to emulate ageing of the memristor. The x-ray absorption spectrum of the material stack within a device crosspoint before its operation (Figure 2a) revealed oxygen bonds to both Hf and Ti, suggesting oxidation of Ti upon sputter deposition of TiN onto HfO 2 and a resulting mixture of Ti and Hf oxides. We used the absorption of the pre O K-edge at 522 eV to monitor total thickness and other structural modulations (especially electrode distortions), the intensity of the 531 eV peak (the lowest conduction band of the stack) as an indicator of the relative conductivity within the crosspoint, 1,21 and the post O K-edge at 570 eV to determine the local oxygen concentration in the film.