a, b, MOKE image sequences of DW inversion for incident ⊙|⊗ (a) and ⊗|⊙ (b) DWs performed in the same device used for Fig. 2c. The edges of the magnetic racetracks are indicated by red dashed lines and the positions of the inverters are indicated by white lines. The bright and dark regions in the magnetic racetracks in the MOKE images correspond to ⊙ and ⊗ magnetization, respectively. The current density and pulse length of the applied current pulses are 7.5 × 1011 A m−2 and 50 ns, correspondingly. The number of applied current pulses is indicated. The entire image sequences are shown in Supplementary Videos 1, 4. c, STXM image sequence of DW inversion for an incident ⊗|⊙ DW and corresponding micromagnetic simulation. Each XMCD image is captured after the application of one current pulse with a current density of 1.1 × 1012 A m−2 and a pulse length of 1 ns. The bright and dark regions in the XMCD images correspond to ⊙ and ⊗ magnetization, respectively. For the simulated images, the IP directions of the magnetizations are given by the colour wheel, and the white and black regions correspond to ⊙ and ⊗ magnetization, respectively. The scale bars in the MOKE images are 3 µm and those in the XMCD images with simulations are 500 nm.