All Topics  
Memory address

 

   Email Print
   Bookmark   Link






 

Memory address



 
 
In computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
, a memory address is an identifier for a memory
Computer memory

Computer memory is usually meant to refer to the semiconductor technology that is used to store information in Electronics devices. Current primary computer memory makes use of integrated circuits consisting of silicon-based transistors....
 location, at which a computer program
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
 or a hardware device can store a piece of data and later retrieve it. Generally this is done through a binary
Binary numeral system

The binary numeral system, or notation with a radix of 2. Owing to its straightforward implementation in digital electronic circuitry using logic gates, the binary system is used internally by all modern computers....
 number
Number

A number is a mathematical object used in counting and measurement. A notational symbol which represents a number is called a Numeral system, but in common usage the word number is used for both the abstract object and the symbol, as well as for the numeral for the number....
 from a finite
Finite

Finite is the opposite of infinite. It may refer to:* Having a finite number of elements: finite set* Being a finite number, so not equal to ; all real numbers are finite...
 monotonically ordered sequence that uniquely describes the memory itself.

In modern byte-addressable computers, each address identifies a single byte
Byte

A byte is a basic unit of measurement of Computer storage in computer science. In many computer architectures it is a Byte addressing memory address space....
 of storage; data too large to be stored in a single byte may reside in multiple bytes occupying a sequence of consecutive addresses.






Discussion
Ask a question about 'Memory address'
Start a new discussion about 'Memory address'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
, a memory address is an identifier for a memory
Computer memory

Computer memory is usually meant to refer to the semiconductor technology that is used to store information in Electronics devices. Current primary computer memory makes use of integrated circuits consisting of silicon-based transistors....
 location, at which a computer program
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
 or a hardware device can store a piece of data and later retrieve it. Generally this is done through a binary
Binary numeral system

The binary numeral system, or notation with a radix of 2. Owing to its straightforward implementation in digital electronic circuitry using logic gates, the binary system is used internally by all modern computers....
 number
Number

A number is a mathematical object used in counting and measurement. A notational symbol which represents a number is called a Numeral system, but in common usage the word number is used for both the abstract object and the symbol, as well as for the numeral for the number....
 from a finite
Finite

Finite is the opposite of infinite. It may refer to:* Having a finite number of elements: finite set* Being a finite number, so not equal to ; all real numbers are finite...
 monotonically ordered sequence that uniquely describes the memory itself.

In modern byte-addressable computers, each address identifies a single byte
Byte

A byte is a basic unit of measurement of Computer storage in computer science. In many computer architectures it is a Byte addressing memory address space....
 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
Word (computer science)

In computing, "word" is a term for the natural unit of data used by a particular computer design. A word is simply a fixed-sized group of bits that are handled together by the machine....
-addressable
, so that the addressable storage unit was larger than a byte. Both the Texas Instruments TMS9900
Texas Instruments TMS9900

Introduced in 1976 and based on the Texas Instruments TI-990 minicomputer Central processing unit, the TMS9900 was one of the first true 16-bit microprocessors ....
 and the National Semiconductor
National Semiconductor

National Semiconductor is a semiconductor manufacturer, specializing in analog devices and subsystems,headquartered in Santa Clara, California, California, United States....
 IMP-16
IMP-16

The IMP-16, by National Semiconductor, was the first multi-chip 16-bit microprocessor. It consisted of five PMOS logic integrated circuits: four four-bit RALU chips providing the data path, and one CROM providing control sequencing and microcode storage....
, used 16 bit words.

In a computer program
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
, an absolute address, (sometimes called an explicit address or specific address), is a memory address that uniquely identifies a location in memory. This is different from a relative address, that is not unique and specifies a location only in relation to somewhere else (the base address
Base address

In computing, a base address is an address serving as a reference point for other addresses.In computers using relative addressing scheme, to obtain an absolute address, the relevant base address is taken and Offset is added to it....
).

Contents of a memory location

Each memory location, in both ROM
Rom

ROM, Rom, or rom is an abbreviation and name that may refer to:...
 and RAM
Ram

Ram, ram, or RAM as a non-acronymic wordAs a non-acronymic word Ram, ram, or RAM may refer to:...
, holds a binary number
Binary numeral system

The binary numeral system, or notation with a radix of 2. Owing to its straightforward implementation in digital electronic circuitry using logic gates, the binary system is used internally by all modern computers....
 of some sort. How it is interpreted, its type
Type theory

In mathematics, logic and computer science, type theory is any of several formal systems that can serve as alternatives to naive set theory, or the study of such formalisms in general....
 meaning and use, only depends on the context of the instructions
Instruction (computer science)

In computer science, an instruction is a single operation of a central processing unit defined by an instruction set architecture. In a broader sense, an "instruction" may be any representation of an element of an executable program, such as a bytecode....
 which retrieve and manipulate it. Each coded item has a unique physical position which is described by another 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 in some other memory location.

So memory can be thought of either as data or instructions or both. This is called the Von Neumann architecture
Von Neumann architecture

The von Neumann architecture is a design model for a stored-program digital computer that uses a central processing unit and a single separate computer storage structure to hold both instructions and data ....
. One can think of memory as just a bunch of numbers or as data
DATA

Debt, AIDS, Trade in Africa is a multinational Non-governmental organization founded in January 2002 in London by U2's Bono along with Robert Sargent Shriver III and activists from the Jubilee 2000 Drop the Debt campaign....
—text data, binary numeric data, or as instructions themselves. This uniformity was introduced in the 1950s. It is usually credited to Von Neumann, though some would be inclined to credit Alan Turing
Alan Turing

Alan Mathison Turing, Order of the British Empire, Fellow of the Royal Society was a British mathematician, logician and Cryptanalysis....
.

Some early programmers encouraged this practice as a way to save memory, when it was expensive: The Manchester Mark 1 had space in its words to store little bits of data— its processor ignored a small section in the middle of a word— and that was often exploited as extra data storage. Self-replicating programs such as viruses
Computer virus

A computer virus is a computer program that can copy itself and infect a computer without the permission or knowledge of the user. The term "virus" is also commonly but erroneously used to refer to other types of malware, adware and spyware programs that do not have the reproductive ability....
 also exploit this, treating themselves sometimes as data and sometimes as instructions. Self modifying code is generally deprecated nowadays, as it makes testing and maintenance disproprortionally difficult to the saving of a few bytes, and can also give incorrect results because of the compiler or processor's assumptions about the machine's state
State (computer science)

In computer science and automata theory, a state is a unique configuration of information in a program or machine. It is a concept that occasionally extends into some forms of systems programming such as Lexical analysiss and parsers....
. But is still used sometimes deliberately, with great care.

Instructions in a storage address are interpreted in their context to the system's main processing unit, and data is read or written by them first to an internal and isolated memory structure called a processor register
Processor register

In computer architecture, a processor register is a small amount of Computer storage available on the CPU whose contents can be accessed more quickly than storage available elsewhere....
, where the next instruction can manipulate it together with data put into other internal memory locations (or internal addresses).

Registers


Registers are the memory addresses within the part of the central processing unit known as the ALU
Arithmetic logic unit

In computing, an arithmetic logic unit is a digital circuit that performs arithmetic and logicaloperations. The ALU is a fundamental building block of the central processing unit of a computer, and even the simplest microprocessors contain one for purposes such as maintaining timers....
, which responds to instructions in registers and uses Combinational logic
Combinational logic

In digital circuit theory, combinational logic is a type of logic circuit whose output is a pure function of the present input only. This is in contrast to sequential logic, in which the output depends not only on the present input but also on the history of the input....
 to determine how to add, subtract, shift or multiply (and so on) the contents of its data registers.

Word size versus address size


A word size is characteristic to a given computer architecture
Computer architecture

Computer architecture in computer engineering is the conceptual design and fundamental operational structure of a computer system. It is a blueprint and functional description of requirements and design implementations for the various parts of a computer, focusing largely on the way by which the central processing unit performs internally an...
. 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
32-bit

The range of integer values that can be stored in 32 bits is 0 through 4,294,967,295 or -2,147,483,648 through 2,147,483,647 using two's complement encoding....
" also usually allows 32-bit memory addresses; a byte-addressable 32-bit computer can address bytes of memory, or 4 gibibyte
Gibibyte

Gibibyte is a unit of Computer data storage, abbreviated GiB.The gibibyte is closely related to the gigabyte, which can either be a synonym for gibibyte, or refer to 109 bytes = 1,000,000,000 bytes, depending on context ....
s (GiB). This seems logical and useful, as it allows one address to be efficiently stored in one word.

But this does not always hold. Computers often have memory addresses larger or smaller than their word size. For instance, almost all 8-bit
8-bit

Eight-bit CPUs normally use an 8-bit data bus and a 16-bit address bus which means that their address space is limited to 64 KBs. This is not a "natural law", however, so there are exceptions....
 processors, such as 6502
MOS Technology 6502

The MOS Technology 6502 is an 8-bit microprocessor that was designed by Chuck Peddle and Bill Mensch for MOS Technology in 1975. When it was introduced, it was the least expensive full-featured central processing unit on the market by a considerable margin, costing less than one-sixth the price of competing designs from larger companies such...
, supported 16-bit addresses&emdash; if not they would have been limited to a mere 256 byte
Byte

A byte is a basic unit of measurement of Computer storage in computer science. In many computer architectures it is a Byte addressing memory address space....
 memory. The 16-bit
16-bit

16-bit architectureThe HP 2100#Descendants and variants , introduced in 1975, was the world's first 16-bit microprocessor.Prominent 16-bit processors include the PDP-11, Intel 8086, Intel 80286 and the WDC 65C816....
 Intel 8088
Intel 8088

The Intel 8088 is an Intel x86 microprocessor based on the Intel 8086, with 16-bit registers and an 8-bit external data bus. It can address up to 1 megabyte of random access memory....
 had only an 8-bit external memory bus on early IBM PC
IBM PC

The IBM Personal Computer, commonly known as the IBM PC, is the original version and progenitor of the IBM PC compatible hardware platform ....
s, and the 16-bit
16-bit

16-bit architectureThe HP 2100#Descendants and variants , introduced in 1975, was the world's first 16-bit microprocessor.Prominent 16-bit processors include the PDP-11, Intel 8086, Intel 80286 and the WDC 65C816....
 Intel 8086
Intel 8086

The 8086 is a 16-bit microprocessor chip designed by Intel and introduced on the market in 1978, which gave rise to the x86 architecture. Intel 8088, released in 1979, was essentially the same chip, but with an external 8-bit bus , and is notable as the processor used in the original IBM PC....
 supported 20-bit addressing, allowing it to access 1 MiB
MIB

MIB may refer to any of several concepts:* Management Information Base, a computing information repository used by Simple Network Management Protocol...
 rather than 64 KiBs of memory. Popular Pentium
Pentium

Introduced on March 22, 1993, the original Pentium was the first superscalar x86 architecture microprocessor. Its fifth-generation x86 microarchitecture was a direct extension of the 80486 architecture with dual integer pipeline s, a faster FPU unit, wider data bus, and features for further reduced address calculation latency....
 processors since introduction of Physical Address Extension
Physical Address Extension

In computing, Physical Address Extension is a feature of x86 and x86-64 processors that enable the use of more than 4 gigabytes of physical memory to be used in 32-bit systems, given appropriate operating system support....
s (PAE) support 36-bit physical addresses, while generally having only a 32-bit word.

The distinction between words and bytes has changed over the years; the DEC PDP 11 had nine-bit words. Knuth, in his seminal work The Art of Computer Programming, based his MIX abstract machine on the PDP 10 which had a shorter, 7-bit word, but he never referred to it as a byte .

A modern byte-addressable 64-bit
64-bit

64-bit CPUs have existed in supercomputers since the 1960s and in RISC-based computer workstation and Server s since the early 1990s. In 2003 they were introduced to the mainstream personal computer arena, in the form of the x86-64 and 64-bit PowerPC processor architectures....
 computer—with proper OS support—has the capability of addressing bytes (or 16 exbibyte
Exbibyte

An exbibyte is a unit of information or computer storage, abbreviated EiB.The exbibyte is related to the ambiguous exabyte, which officially means 1018 bytes, but is commonly used to mean exbibyte....
s) which is considered practically unlimited, being far more than the total amount of RAM ever manufactured. That being said, perhaps the most notable quote of Bill Gates
Bill Gates

William Henry "Bill" Gates III is an United States business magnate, philanthropist, author, the List of the 100 wealthiest people , and chairman of the board of Microsoft, the software company he founded with Paul Allen....
 (even if inaccurate) is 640kb is ought to be good enough for anybody.

Virtual memory versus physical memory

Virtual memory is now universally used on desktop machines. It maps physical memory to different addresses by way of page tables. In so doing, the Operating System
Operating system

An operating system is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer....
 can decide to allocate memory as it deems best without causing the program to halt from a long garbage collection
Garbage collection (computer science)

In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage , or memory used by Object that will never be accessed or mutated again by the Application software....
 process. Some literature The physical blocks of memory (typically 4Kb chunks) are mapped to virtual addresses by the virtual memory program in the Kernel
Kernel (computing)

In computing, the kernel is the central component of most computer operating systems. Its responsibilities include managing the system's resources ....
. This is now done in hardware, formerly was done in software. The purpose of virtual memory is to abstract memory allocation, allowing the physical space to be allocated as is best for the hardware (that is, usually in good sized blocks), and to still be seen as contiguous from a program or compiler
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
's perspective. Virtual memory is supported by some operating systems (for example, Windows but not DOS) in conjunction with the hardware. One may think of virtual memory as a filter, or an alternate set of memory addresses (that are mapped to real addresses) that allow programs (and by extension, programmers) to read from memory as quickly as possible without requiring that memory to be specifically ordered. Programs use these contiguous virtual address
Virtual address

In computer terminology a virtual address is an address identifying a virtual entity. The term virtual address is most commonly used for virtual memory or virtual network address....
es, rather than real, and often fragmented, physical address
Physical address

In computing, a physical address, also real address, or binary address, is the memory address that is electronically presented on the address bus circuitry in order to enable the data bus to access a particular storage cell of main memory....
es, 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
Logical address

In Data Networks:In computer networks, a logical address refers to a network layer address such as an IP address, an X.25/X.121 or IPX address....
 is a synonym of virtual address.

Virtual memory also allows enlarging the address space
Address space

In computing, an address space defines a range of discrete addresses, each of which may correspond to a physical or virtual memory register, a Node , peripheral device, disk sector or other logical or physical entity....
, the set of addresses a program can utilize and thus allows computers to make use of secondary storage that looks, to programs, like main memory. For example, virtual address space might contain twice as many addresses as main memory with the extra addresses mapped to hard disk space in the form of a swap file (also known as page file). It copies them back (called swapping
Swapping

Swapping can mean:* Paging or thrash in computer systems* Swapping * Hot swapping* Book swappingSee also * Swap...
) into main memory as soon as they are needed. These movements are performed in the background and in a way invisible for programs.

See also

  • Address space
    Address space

    In computing, an address space defines a range of discrete addresses, each of which may correspond to a physical or virtual memory register, a Node , peripheral device, disk sector or other logical or physical entity....
  • Addressing mode
    Addressing mode

    Addressing modes are an aspect of the instruction set architecture in most central processing unit designs. The various addressing modes that are defined in a given instruction set architecture define how Machine code Instruction in that architecture identify the operand of each instruction....
  • Base address
    Base address

    In computing, a base address is an address serving as a reference point for other addresses.In computers using relative addressing scheme, to obtain an absolute address, the relevant base address is taken and Offset is added to it....
    • Offset (computer science), also known as a displacement
  • Computer engineering
    Computer engineering

    Computer Engineering is a discipline that combines elements of both Electrical Engineering and Computer Science. Computer engineers are electrical engineers that have additional training in the areas of software design and hardware-software integration....
  • Computer science
    Computer science

    Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
  • Endianness
    Endianness

    In computing, endianness is the byte ordering used to represent some kind of data. Typical cases are the order in which integer values are stored as bytes in computer memory and the transmission order over a network or other medium....
  • Physical address
    Physical address

    In computing, a physical address, also real address, or binary address, is the memory address that is electronically presented on the address bus circuitry in order to enable the data bus to access a particular storage cell of main memory....
  • Virtual memory
    Virtual memory

    Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory , while in fact it may be physically fragmented and may even overflow on to disk storage....
    • Virtual address
      Virtual address

      In computer terminology a virtual address is an address identifying a virtual entity. The term virtual address is most commonly used for virtual memory or virtual network address....
      , also known as logical address
      Logical address

      In Data Networks:In computer networks, a logical address refers to a network layer address such as an IP address, an X.25/X.121 or IPX address....
    • Page table
      Page table

      A page table is the data structure used by a virtual memory system in a computer operating system to store the mapping between virtual addresses and physical addresses....
    • Memory management unit
      Memory management unit

      A memory management unit , sometimes called paged memory management unit , is a computer hardware component responsible for handling accesses to computer memory requested by the central processing unit ....
       (MMU)