How mar and mdr work?
MAR (Memory Address Register) holds the address of the memory location to be accessed or written to in the memory unit, whereas MDR (Memory Data Register) holds the actual data that is to be written to a memory location or data read from a memory location. MAR is used to specify the address, while MDR is used to temporarily store the data during memory operations.