Memory address
|
In computer science, a memory address is a unique identifier for a memory location at which a CPU or other device can store a piece of data for later retrieval. In modern byte-addressable computers, each address identifies a single byte of storage; data too large to be stored in a single byte may reside in multiple bytes occupying a sequence of consecutive addresses.
Many modern computers support virtual memory, which introduces the notions of virtual and physical addresses. Physical addresses are those the computer's circuitry uses to signal an address to RAM chips; to retrieve some data, its physical address is transmitted from the CPU to the RAM, and the RAM responds with the data. Virtual addresses, on the other hand, are the addresses manipulated by the software running on the computer. When the software requests some data, the computer first translates the data's virtual address into a physical address before being transmitted to the RAM. This translation is invisible to software, and allows the software to operate independently of its location in physical memory, giving the operating system the freedom to allocate and reallocate memory as needed to keep the computer running efficiently.
Very often, when referring to the word size of a modern computer, one is also describing the size of virtual memory addresses on that computer. For instance, a computer said to be "32-bit" usually treats memory addresses as 32-bit integers; a byte-addressable 32-bit computer can address <math>2^{32} = 4,294,967,296<math> bytes of memory, or 4 gigabytes. However, older computers often supported memory addresses larger than their word size, or else their memory capacity would be unreasonably small. For instance, the 8-bit 6502 supported 16-bit addresses, or else it would be limited to a mere 256 bytes. Similarly, the 16-bit Intel 8086 supported 20-bit addresses, allowing it to access 1 megabyte rather than 64 kilobytes. A byte-addressable 64-bit computer can address <math>2^{64}<math> bytes (or 16 exabytes) which as of 2005 is considered practically unlimited, being far more than the total amount of RAM ever manufactured.