Fact-checked by Grok 2 weeks ago

Memory address register

The memory address register (MAR), also known as the address buffer, is a specialized register within the (CPU) of a computer that temporarily holds the of the location from which data or instructions are to be read or to which they are to be written. In the , the foundational model for most modern computers, the MAR plays a critical role in the fetch-decode-execute cycle by receiving addresses from the (PC) or other sources, such as effective addresses for operands, and driving these addresses onto the address bus to access (RAM) or (ROM). The MAR interacts closely with the memory data register (MDR), where the MAR specifies the target location while the MDR handles the actual transfer of data to or from that location, enabling efficient read and write operations. For instance, during a read operation, the desired address is loaded into the MAR, a read signal is sent to the , and the requested data is then placed into the MDR for processing by the CPU. The bit width of the MAR determines the maximum addressable space—for example, a 16-bit MAR can address up to 65,536 unique locations—directly influencing the system's capacity and supporting various addressing modes such as , indirect, indexed, or base-relative addressing. This register's design ensures precise and rapid access, forming an essential component of the processor's interface with main in both historical and contemporary computer architectures.

Introduction

Definition and Purpose

The (MAR) is a special-purpose register within the (CPU) that temporarily holds the indicating the specific location in (RAM) or other memory devices from which data is to be read or to which data is to be written. This register ensures that memory operations target the precise address required by the current instruction, preventing errors in data retrieval or storage. The primary purpose of the is to facilitate access to specific locations by supplying the to the memory unit, thereby serving as a critical interface between the and the memory subsystem. By latching the address during a memory cycle, it allows the CPU to coordinate read or write actions efficiently, enabling seamless execution of programs that rely on stored instructions and data. The works alongside the Memory Data Register (MDR) to complete these operations, where the handles addressing while the MDR manages data transfer. Key characteristics of the MAR include its typical integration as part of the CPU's , which orchestrates overall operations. In many designs, it operates unidirectionally, outputting solely to the via the address bus without receiving data in return. Additionally, the MAR's bit width aligns with the system's address bus to support the full range of addressable ; for instance, it is bits wide in systems addressing up to 4 gigabytes or bits in modern architectures capable of addressing vastly larger spaces. As an example, in a basic CPU design, the MAR might receive an address directly from the for fetching the next instruction or from an operand field in the current instruction for data access, holding that address stable throughout the ensuing cycle to ensure reliable transfer.

Historical Development

The concept of the (MAR) emerged in the mid-1940s as a fundamental component of stored-program computers, enabling the to specify locations in a for instructions and data. John von Neumann's 1945 "First Draft of a Report on the " outlined the stored-program , describing mechanisms for the CPU to access locations for reading or writing operations, which laid the groundwork for dedicated address-handling registers like the MAR. This design addressed the need for efficient access in systems where programs and data resided in the same addressable space, laying the groundwork for von Neumann-style computing. By 1949, early implementations appeared in pioneering stored-program machines. The , an advancement from the 1948 "Baby" computer, introduced index registers (B-lines) to modify addresses dynamically, building on basic address storage mechanisms required for instruction fetching and execution. Similarly, the at the , operational in the same year, used control logic and binary counters to specify addresses for its mercury access, later incorporating index registers to enhance addressing flexibility. These systems demonstrated the practical necessity of dedicated address handling in real-time computing tasks. Key milestones in the 1950s and 1960s formalized explicit MAR hardware in commercial designs. The , introduced in 1952 as one of the first production scientific computers, featured an within its structure—a 12-bit component combining a trigger and binary counter for memory addressing in its electrostatic storage tubes. This evolved further in minicomputers like the DEC PDP-8 (1965), which included a dedicated 12-bit (MA) to select locations across its core memory banks, supporting up to 4K words initially and enabling widespread use in applications. The 1970s brought integration into microprocessors, with the (1975) embedding address generation circuitry—functionally equivalent to a —onto a single chip, driving its 16-bit address bus for 64 access in cost-effective systems. By the 1980s, the became integral to reduced instruction set (RISC) architectures, such as (initiated in 1981), where it supported load/store operations in a register-rich design optimized for pipelining. Extensions for virtual addressing appeared in processors like the 80386 (1985), where the translates 32-bit virtual addresses to physical addresses that are then loaded into the for access to up to 4 of physical memory space.

Functionality

Role in Memory Operations

In memory read operations, the Memory Address Register (MAR) is loaded with the target , which is then placed on the address bus to select the specific location in . The control unit asserts a read enable signal, prompting the memory to retrieve the data from that address and transfer it to the Memory Data Register (MDR) without any modification to the contents of the during this process. This ensures that the address remains stable, allowing the memory module to accurately decode and access the intended location. For memory write operations, the holds the destination address, which is driven onto the address bus to identify the target location. The data to be stored, sourced from the MDR, is simultaneously placed on the data bus, and the activates a write enable signal to instruct the to store the data at the address specified by the . During the write, the content is not altered, maintaining address integrity throughout the transfer. The timing and control of MAR involvement in these operations are governed by memory control signals such as read/write enable and memory enable, synchronized to the system clock to ensure stable presentation on the bus. These signals dictate the direction of data flow and the duration of the access cycle, with the MAR required to hold its value steadily until the operation completes, which may span one or more clock cycles in synchronous designs depending on the and memory subsystem. Invalid memory addresses, such as those resulting from calculation overflow when loaded into the , can trigger hardware-detected exceptions like bus errors or OS-handled faults such as segmentation faults or page faults, depending on the system architecture.

Interaction with CPU Components

The Memory Address Register () receives memory addresses from the () during the instruction fetch phase, where the PC maintains the location of the next in . This transfer occurs via internal data paths controlled by timing signals, ensuring the MAR holds the precise for accessing the instruction from primary . Following the fetch, the links to the () by loading addresses decoded from the instruction stored in the , particularly for operations requiring operand access from . These addresses, often derived from the instruction's or s, are routed to the to initiate subsequent memory reads, supporting the execution of instructions that reference external data. The MAR integrates indirectly with the Arithmetic Logic Unit (ALU) by providing memory addresses for operands needed in computations, allowing data fetched via the MAR to reach ALU inputs through intermediate registers like the Memory Data Register (MDR). This address specification enables the ALU to perform operations on memory-sourced values without direct MAR-ALU wiring, relying instead on the processor's data path for operand delivery. In bus interactions, the outputs addresses to the unidirectional address bus to drive selection, while it accepts inputs from internal buses that convey addresses from general-purpose registers or immediate values encoded directly in instructions. These bidirectional internal connections facilitate flexible addressing modes, such as register-indirect or immediate-offset, enhancing the CPU's ability to handle diverse references. The oversees MAR operations by generating latching signals to load into the MAR and unlatching signals to transfer them to the address bus, implemented either via hardwired combinatorial logic for fixed sequences or microprogrammed sequences for configurable . These signals synchronize MAR activity with the clock, ensuring precise timing in flows across CPU components. Such coordination forms a key part of the fetch-execute cycle in architectures.

Technical Aspects

Structure and Implementation

The (MAR) is typically implemented as a parallel-in, parallel-out composed of D flip-flops, one for each bit, to synchronously the on the rising edge of the . This structure ensures stable holding during cycles, with each flip-flop providing temporary for a single bit while the overall supports parallel loading from sources like the or . In VLSI designs, such as those using 90 nm processes, the MAR integrates into the processor's unit as part of a , operating at speeds up to 200 MHz under a 1.2 V supply to facilitate high-performance addressing via decoders. The width of the MAR directly corresponds to the system's addressable memory space, as the number of bits determines the maximum number of unique locations that can be addressed. For instance, a 16-bit MAR, common in early microprocessors like the , supports up to 65,536 bytes (64 KB) of memory. In contrast, contemporary 64-bit systems employ a 64-bit MAR to address up to 2^64 bytes, or approximately 16 exabytes, aligning with the address bus width to enable efficient, contention-free transfers without additional segmentation. Implementation in modern VLSI chips often incorporates the as a special-purpose , utilizing multiplexers to select and route from multiple CPU sources, such as decoding outputs or branch targets, thereby optimizing and reducing wiring complexity. Decoders and enable signals further manage read/write operations to the , ensuring precise synchronization. Performance considerations emphasize minimal in latching and decoding; for example, edge-triggered flip-flops in the contribute to access times under 2.5 ns in static RAM-integrated designs, though larger systems must account for propagation delays in decoding paths that can extend to several clock cycles.

Operation in Instruction Cycle

In the fetch phase of the CPU's instruction cycle, the (PC) loads the memory address of the next instruction into the (MAR), which then drives the address bus to retrieve the instruction from memory and store it in the (IR). This step ensures the processor accesses the correct location in main memory, typically using the MAR's output to select the word-addressable unit. During the decode phase, the examines the in the IR; if the involves operands, such as in load or operations, it calculates the effective —often by adding a base register to an from the —and loads this into the MAR for subsequent access. This preparation allows the MAR to hold the precise operand without redundant fetches. In the execute phase, for load or store instructions, the MAR retains the operand address to facilitate data transfer between memory and the memory data register (MDR), enabling operations like or data movement. For or instructions, the MAR may temporarily hold the target address before it updates the PC, directing the flow of execution. Upon cycle completion, the MAR is typically cleared or updated to reflect the next required address, and in cases of interruptions, its state may be preserved to maintain program continuity. A representative example is the load (LDA addr), where the first holds the PC value during fetch to retrieve the , then receives the computed effective (addr) in decode and execute phases to load the operand into the accumulator.

Comparisons and Variations

MAR versus Memory Data Register

The Memory Register () and Memory Data Register (MDR) serve complementary yet distinct functions in , with the exclusively managing memory to specify locations for access, while the MDR handles the actual payloads transferred to or from those locations. The operates unidirectionally, outputting the via the address bus to select the target memory cell, whereas the MDR is bidirectional, enabling to flow in both directions—receiving during reads and providing it during writes—over the data bus. This separation ensures efficient memory operations by isolating location from content transfer, a design principle fundamental to the . In typical memory operations, the precedes the in the data flow sequence: the is first loaded into the to initiate to the specified location, after which the facilitates the subsequent movement of between the and the . For instance, during a memory read cycle, the sets the location by driving the address onto the bus, prompting the to retrieve the , which is then latched into the for transfer to the CPU; conversely, in a write cycle, the first establishes the location, followed by the supplying the payload to be stored. Both registers act as temporary buffers to synchronize these transfers, often matching the width of their respective buses—typically the address bus for the and the data bus for the —and responding to shared control signals like clock pulses or enable lines for timing coordination.
AspectMemory Address Register (MAR)Memory Data Register (MDR)
Primary FunctionHolds and outputs for location selectionHolds and transfers payload for read/write operations
DirectionalityUnidirectional (output to bus)Bidirectional ( via bus)
Role in Data FlowInitiates by specifying location firstFollows MAR to handle exchange
Typical WidthMatches bus (e.g., number of addressable locations)Matches bus (e.g., word size like or bits)
Control SignalsLoad , enable outputLoad , read/write enable
This pairing of and MDR was co-developed in early stored-program computers, such as the proposed in the 1940s, to distinctly separate addressing mechanisms from data handling, enabling scalable memory interfaces in -based systems.

MAR in Architectural Variants

In the , a single memory address register () serves both instruction and data accesses within a unified , where the same stores both program code and operands. This shared resource requires the MAR to sequentially handle addresses for fetching instructions via the and for data operations, potentially creating a performance limitation known as the von Neumann bottleneck due to contention on the common memory bus. The addresses this by incorporating separate MARs: an instruction MAR (I-MAR) for program addressing and a MAR (D-MAR) for operand , connected via distinct buses that support simultaneous reads or writes. This separation enables parallel instruction fetch and access, reducing in time-critical applications. Such designs are prevalent in embedded systems, including microcontrollers like the AVR family developed by (now ), which use a modified Harvard structure with independent program flash and SRAM spaces accessed through dedicated address paths. In reduced instruction set computing (RISC) architectures, such as , the MAR is typically simplified to handle fixed-length addresses in a load/store model, where memory operations are restricted to explicit instructions that generate straightforward addresses from a uniform . This promotes efficiency and minimizes address calculation overhead. Conversely, complex instruction set computing (CISC) architectures like x86 feature a more intricate MAR implementation that accommodates variable-length instructions and diverse addressing modes, including segmented addressing, base-index scaling, and calculations involving multiple registers. Modern processor extensions further adapt the MAR concept for enhanced and parallelism. The (MMU) introduces virtual address handling, where software-generated virtual addresses are translated to physical addresses before being latched into the MAR, enabling protected memory spaces and demand paging without altering the core MAR function. In superscalar processors, pipelined MAR operations support multiple concurrent memory requests through dedicated address generation units in load/store pipelines, allowing outstanding accesses to overlap and improve throughput in . For instance, in Harvard-based processors (DSPs) such as the TMS320C28x series, dual address registers—manifested as separate program address bus (PAB) and data address bus (DAB) controllers—facilitate simultaneous instruction fetching from program memory and operand loading from data memory, optimizing tasks like filtering.

References

  1. [1]
    Memory Address Register - an overview | ScienceDirect Topics
    The memory address register (MAR), also known as the address buffer, is a register within the central processing unit (CPU) that stores the address referencing ...Function and Operation of the... · MAR and Memory Addressing...
  2. [2]
    [PDF] Chapter 4 The Von Neumann Model - Computer Sciences
    MAR: Memory Address Register. MDR: Memory Data Register. To read a location (A):. 1. Write the address (A) into the MAR. 2. Send a “read” signal to the memory.
  3. [3]
    [PDF] PART OF THE PICTURE: Computer Architecture
    For this purpose, it typically makes use of two internal (to the processor) registers: a memory address register (MAR),which specifies the address in memory for ...
  4. [4]
    How The Computer Works: The CPU and Memory
    An address register, which keeps track of where a given instruction or piece of data is stored in memory. Each storage location in memory is identified by ...
  5. [5]
    Memory interface – Clayton Cafiero - University of Vermont
    Oct 28, 2025 · the address bus, which is unidirectional, from CPU to memory, and ... the address of the memory location is placed in the memory address register ...
  6. [6]
    [PDF] Von Neumann Computers 1 Introduction - Purdue Engineering
    Jan 30, 1998 · The second key feature is that memory is accessed by name (i.e., address) independent of the bit pattern stored at each address.
  7. [7]
    [PDF] Programming the EDSAC - IET EngX®
    Initially EDSAC had no index register. • Invented for Manchester Mark 1 in 1949. • Later adopted by EDSAC. • So to do an indexed calculation, e.g., sum a ...
  8. [8]
    [PDF] Buchholz: The System Design of the IBM Type 701 Computer
    Tape requires an extra 6-bit register, the only special-purpose buffer storage in the machine. Electrostatic memory, as used in the 701,2.3 requires.
  9. [9]
    [PDF] PDP-8 Small Computer Handbook - Bitsavers.org
    Memory Address (MA) Register. The MA register is a 12-bit register that contains the address in core memory which is currently selected for reading or writing.
  10. [10]
    [PDF] 6502.pdf
    Arithmetic and Logic Unit (ALU). All arithmetic and logic operations take place in the ALU including incrementing and decrementing internal registers. (except ...Missing: MAR | Show results with:MAR<|separator|>
  11. [11]
    [PDF] MIPS Architecture
    Load transfers a word from a source address in RAM into a target register. • Address is stored in Memory Address Register (MAR). • Address then goes on the bus ...
  12. [12]
    [PDF] Introduction to the 80386
    The 80386 is a 32-bit architecture with high-performance implementation, virtual memory support, configurable protection, and extended debugging support.
  13. [13]
    [PDF] Chapter 4 The Von Neumann Model
    Reads data from memory. Base + offset addressing mode. • Add offset to base register to produce memory address. • Load from memory address into destination ...
  14. [14]
    CS 201 - Fall 2021. - Zoo | Yale University
    There are two special registers, the memory address register (MAR) and the memory data register (MDR), and a signal indicating whether to read from the memory ...
  15. [15]
    Memory Address Register - an overview | ScienceDirect Topics
    The memory address register is used to handle the address transferred to the memory unit, and this can be handled either using a bus approach.
  16. [16]
    [PDF] EE108B Lecture 14 Virtual Memory - Stanford University
    Detect invalid address event lw. • Memory Reference. – User writes to memory location. – Address is not valid. – Page handler detects invalid address. – Sends ...Missing: errors | Show results with:errors
  17. [17]
    ALU Functions and Bus Organization - GeeksforGeeks
    Oct 13, 2025 · In the CPU, buses are used to carry data, addresses, and control signals between registers, ALU, and memory. Three main types: Data Bus, Address ...
  18. [18]
    A1.1.1 Describe the functions and interactions of the main CPU ...
    Interaction: The ALU receives the data (operands) it needs for calculations from registers within the CPU. Once the operation is complete, the ALU sends the ...
  19. [19]
    A1.1.1 The Functions and Interactions of the Main CPU Components
    The Memory Address Register is a register, located within the CPU, that stores the address at which the next instruction or piece of data can be found. Before a ...
  20. [20]
    [PDF] Lecture 2 The CPU, Instruction Fetch & Execute
    * MAR The Memory Address Register is used to store the address to access ... If the data is an instruction it gets moved to the Instruction Register. The ...
  21. [21]
    [PDF] Chapter 4
    Memory address register, MAR, a 12-bit register that holds the memory ... – 24 bit address bus (16 Mb of RAM), 16 bit data bus. – Protected mode – OS ...
  22. [22]
    CPU's Control Unit | Computer Architecture - Witscad
    The purpose of the Control Unit is to generate control signals. These control signals facilitate flawless execution of instructions in CPU.
  23. [23]
    Organization of Computer Systems: Processor & Datapath - UF CISE
    Simple datapath components include memory (stores the current instruction), PC or program counter (stores the address of current instruction), and ALU (executes ...
  24. [24]
    [PDF] VLSI System Implementation of 200 MHz, 8-bit, 90nm CMOS ...
    For this purpose a register called memory address register is constructed of D-type flip flops. Page 6. VLSI System Implementation of 200 MHz, 8-bit, 90nm ...<|separator|>
  25. [25]
    Memory Organization and Addressing - Edward Bosworth
    The memory address is specified by a binary number placed in the Memory Address Register (MAR). The number of bits in the MAR determines the range of addresses ...
  26. [26]
    How do 16-bit addresses work inside 8-bit data bus processors?
    Sep 17, 2022 · To address 64k you need 16 bits, or two 8 bit bytes. The address ... memory address register. 2- Access RAM and place instruction onto ...
  27. [27]
    [PDF] The Memory Hierarchy
    Memory access time is number of clock cycles (S) to send the address + number of clock cycles (A) to access the DRAM + number of clock cycles (T) to transfer a ...
  28. [28]
    [PDF] An Introduction to a Simple Computer
    Registers hold data that can be readily accessed by the CPU. • They can be implemented using D flip-flops. – A 32-bit register requires 32 D flip-flops.
  29. [29]
    [PDF] MARIE: An Introduction to a Simple Computer
    – (2) Memory address register, MAR, a 12-bit register that holds the memory ... The fetch-decode-execute cycle is the series of steps that a computer ...
  30. [30]
    Computer Organization and Architecture - Otterbein University
    Mar 30, 2009 · Memory cells organized in a 2D grid; Memory Address Register (MAR) to hold address of cell whose contents are to be read or modified. Memory ...
  31. [31]
    Machine Language Model
    Instruction Cycle. loop forever fetch instruction whose address is in PC ... MAR: memory address register holds the address of the memory reference. MDR ...
  32. [32]
    [PDF] Computer Organization and Architecture
    Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed in initial caps or all caps.
  33. [33]
    [PDF] COMPUTER ORGANIZATION AND ARCHITECTURE
    MDR – (Memory Data Register):- It contains the data to be written into or read out of the address location. Operating steps are. 1. Programs reside in the ...
  34. [34]
    John Von Neumann and Computer Architecture - Washington
    The von Neumann architecture also has a bottleneck because data and instructions cannot be accessed in parallel as in the Harvard architecture, they much be ...
  35. [35]
  36. [36]
    AVR® Memory - Microchip Developer Help
    Nov 9, 2023 · AVR microcontrollers are built using a modified Harvard Architecture. This means the Flash Program Memory space is on a separate address bus than the Static ...Missing: MAR | Show results with:MAR
  37. [37]
    [PDF] ARM Architecture Reference Manual
    ... ARM architecture. The ARM is a Reduced Instruction Set Computer (RISC), as it incorporates these typical RISC architecture features: • a large uniform ...
  38. [38]
    The Memory Management Unit (MMU) - Arm Developer
    The Memory Management Unit (MMU) is responsible for the translation of virtual addresses used by software to physical addresses used in the memory system.
  39. [39]
    [PDF] The Microarchitecture of Superscalar Processors - cs.wisc.edu
    Aug 20, 1995 · With simple pipelining, only one instruction at a time is initiated into the pipeline, but multiple instructions may be in some phase of execu-.