Von Neumann Architecture
The Von Neumann architecture forms the core of almost every computer system. It's characterized by the use of a single memory system for storing both instructions and data. Key components of this architecture are several registers, each with a specific purpose.
MAR (Memory Address Register)
Purpose: MAR holds the address in memory where data or instructions are to be fetched or stored.
Storage: It stores addresses, not data.
Explanation: When the CPU needs to read or write data, it first places the address of the required memory location into the MAR.
MDR (Memory Data Register)
Purpose: MDR temporarily holds the data read from or written to the memory.
Storage: It stores actual data.
Explanation: MDR acts as a buffer, holding data fetched from the memory or data waiting to be stored in memory.
Program Counter (PC)
Purpose: The Program Counter keeps track of the address of the next instruction to be executed.
Storage: It stores addresses of instructions.
Explanation: PC is updated after each instruction fetch, ensuring that the CPU executes instructions in the correct sequence.
Accumulator
Purpose: The Accumulator is used as a temporary storage for arithmetic and logical operation results.
Storage: It stores data (results of operations).
Explanation: During arithmetic or logical operations, the results are stored in the Accumulator, often for further processing or before being moved to memory.