Memory injection for inverting operation