Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
A student's notes say: "The MAR and the MDR both hold data from memory." The student's teacher says this is wrong.
Describe the purpose of the memory address register (MAR) and of the memory data register (MDR). Then explain why the student's note is wrong.
The CPU has two units. The ALU does calculations and logic, and the CU decodes instructions and sends control signals. There are five registers. The PC holds the address of the next instruction and the MAR holds the address being used. The MDR holds the data or instruction read or to be written. The CIR holds the instruction being decoded and executed, and the ACC holds the result from the ALU. The address bus goes one way, from the CPU to memory. The data bus and the control bus go both ways.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Plan. Say what each register holds, and when it is used.
Step 1. The MAR. The MAR holds the address of the memory location that is about to be read from or written to. The address goes from the MAR along the address bus.
Step 2. The MDR. The MDR holds the data or instruction that has just been read from that location. When data is to be written, the MDR holds the data on its way to memory.
Step 3. The note. Only the MDR holds data. The MAR holds an address, which says where the data is, not what it is.
Answer: the MAR holds the address being used. The MDR holds the data or instruction read from, or to be written to, that address. The note is wrong because the MAR holds an address, not data.
Watch out. An instruction is also something the MDR can hold. During a fetch, the MDR holds the instruction before it is copied to the CIR.
Log in to join the discussion.
Loading…