Memory address
Wikipedia, the free encyclopedia - Cite This SourceIn computer science, a memory address is an identifier for a memory location, at which a computer program or a hardware device can store a piece of data for later retrieval. By common example, this identifier could be a binary number from a finite monotonically ordered sequence.
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. Some microprocessors were designed to be word-addressable, so that the addressable storage unit was larger than a byte. Examples include the Texas Instruments TMS9900 and the National Semiconductor IMP-16, both of which used 16 bit words.
In computer program, an absolute address, also called explicit address or specific address, is a memory address that uniquely identifies a location in memory. This is opposed to a relative address, that is not unique and specifies a location only in relation to some other location (the base address).
Contents of a memory location
Each memory location, in both ROM and RAM memory, holds a generic binary number of some sort. How it is interpreted, its type, and meaning, and usage, only depends on the context of the instructions which retrieve and manipulate it. Each such coded item has a unique physical position which is described by another unique binary number, the address of that single word, much like each house on a street has a unique number. A pointer is an address itself stored, as data, in some other memory location.The interesting concept about items stored in memory: not only they can be interpreted as data—text data, binary numeric data, and so forth—but also as instructions themselves, in a uniform manner. This uniformity was introduced with von Neumann architecture and is prevalent in computers since 1950s.
Instructions in a storage address are contextually interpreted as command words to the systems main processing unit, and data is retrieved by such instructions placed in an internal and isolated memory structure called a storage register, where the subsequent instruction can manipulate it in conjunction with data retrieved into other internal memory locations (or internal addresses). Registers are the memory addresses within the part of the central processing unit known as the arithmetic logic unit (ALU), which responds to binary instructions (machine code) fetched into instruction registers selecting combinatorial logic determining which data registers should be added, subtracted, circulated (shifted), and so forth at the low machine language level of binary manipulation of data.
Word size versus address size
A word size is characteristic to a given computer architecture. It denotes the number of bits that a CPU can process at one time. Historically it has been sized in multiples of four and eight bits (nibbles and bytes, respectively), so sizes of 4, 8, 12, 16, 24, 32, 48, 64, and larger came into vogue with technological advances.Very often, when referring to the word size of a modern computer, one is also describing the size of address space on that computer. For instance, a computer said to be "32-bit" usually allows also 32-bit memory addresses; a byte-addressable 32-bit computer can address bytes of memory, or 4 gibibytes (GiB). This seems logical and useful, as it allows one address to be efficiently stored in one word.
However, this is not always the case. Computers often have memory addresses larger or smaller than their word size. For instance, almost all 8-bit processors, such as 6502, supported 16-bit addresses, or else they would have been limited to a mere 256 bytes capacity. Similarly, the 16-bit Intel 8086 supported 20-bit addressing, allowing it to access 1 MiB rather than 64 KiBs of memory. Also popular Pentium processors since introduction of Physical Address Extensions (PAE) support 36-bit physical addresses, while generally having only a 32-bit word.
Modern byte-addressable 64-bit computer can address bytes (or 16 exbibytes) which as of 2005 is considered practically unlimited, being far more than the total amount of RAM ever manufactured.
Virtual memory versus physical memory
Virtual memory is an imaginary memory area supported by some operating systems (for example, Windows but not DOS) in conjunction with the hardware. You can think of virtual memory as an alternate set of memory addresses. Programs use these virtual addresses, rather than real physical addresses, to store instructions and data. When the program is actually executed, the virtual addresses are translated on the fly into real memory addresses. Logical address is a synonym of virtual address. The purpose of virtual memory is to ease memory allocation, so the memory could be allocated in non-contiguous blocks, and still be seen as contiguous from a program perspective.The side effect of virtual memory is enlarging the address space, the set of addresses a program can utilize. For example, virtual address space might contain twice as many addresses as main memory. Also, with paging, programs may be actually allowed to utilize more virtual memory than physically available. The operating system can use a swap file (also known as page file) on a hard drive as a temporary storage for areas of memory that are not being actively used at the moment. It copies them back into main memory data as soon as they are needed. These movements are performed in the background and in a way invisible for programs.
Physical memory refers to anything pertaining to hardware, the actual RAM chips installed in a computer and state of flip-flops there. Virtual (logical) describes software point of view, an imaginary storage area used by program. A physical data structure refers to the actual organization of data on a storage device. The logical data structure refers to how the information appears to a program or user. For example, a data file is a collection of information stored together. This is its logical structure. Physically, however, a file is often stored on a disk in several scattered pieces.
See also
- Addressing mode
- Base address
- Offset (computer science), also known as a displacement
- Computer engineering
- Computer science
- Endianness
- Physical address
- Virtual memory
- Virtual address, also known as logical address
- Page table
- Memory management unit (MMU)
Wikipedia, the free encyclopedia © 2001-2006 Wikipedia contributors (Disclaimer)
This article is licensed under the GNU Free Documentation License.
Last updated on Sunday February 17, 2008 at 16:42:15 PST (GMT -0800)
View this article at Wikipedia.org - Edit this article at Wikipedia.org - Donate to the Wikimedia Foundation