Addresses A digital computer's memory consists of many memory locations, each having a memory address, a number, analogous to a street
address, at which a computer program directs a hardware device, generally called the memory controller, to store data and later retrieve it. The memory controller uses the system bus, or separate control, address and data busses, to execute the program's commands. Most modern computers are byte-addressable, with each address identifying a single eight bit byte or character of storage; data too large to be stored in a single byte may reside in multiple bytes occupying a sequence of consecutive addresses. Other computers are word-addressable, with addressable storage units larger than a byte. For example, the Data General Nova minicomputer, and the Texas Instruments TMS9900 and National Semiconductor IMP-16 microcomputers used 16 bit words, and there were many 36-bit mainframe computers which used 18-bit word addressing. The efficiency of addressing of memory depends on the size of the address bus. In a computer program, an absolute address, (sometimes called an explicit address or specific address), is a memory address that uniquely identifies a location in memory.[citation needed] This is different from a relative address, that is not unique and specifies a location only in relation to somewhere else (the base address). Virtual memory also adds a level of indirection.
Contents of the memory location
Each memory location, in both ROM and RAM, holds a binary number of some sort. How it is interpreted, its type meaning and use, only depends on the context of the instructions 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. One can think of memory as just a bunch of numbers or as data 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[who?] would be inclined to credit Alan Turing. 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 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 disproportionally 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. But is still sometimes used 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, where the next instruction can manipulate it together with data and put it into other registers memory locations
How a program generate a memory address?
numerical memory addresses are mapped during boot, (memory mapping) giving the physical memory numerical equivalents the CPU and OS can relate to, since the computer sees everything as numbers. The application sends a notice to the CPU that it needs a certain amount of memory to operate, and the CPU sends a signal to [Link], which allocates that amount of memory to the available numerical addresses. [Link] is the memory manager that does the "grunt work". This is a VERY simplified description, it's actually much more detailed than that, but that should give you the basics.