When the CPU needs to access memory (either to read data/instruction or write data), it uses two primary registers for the transfer: 1. Memory Address Register (MAR): Stores the address of the memory location the CPU wants to access. 2. Memory Data Register (MDR) or Memory Buffer Register (MBR): Temporarily stores the data being read from or written to the memory location specified by the MAR. Data flows between the MDR and the data bus, and between the data bus and memory.