Memory

Memory (also called random access memory or RAM) is an array of cells. A cell is a component capable of storing a single byte of information.

Each cell has a unique address. This is its position in the array. The address can be represented as a bit-string.

The following diagram shows a memory component consisting of 65,536 cells:

The capacity of memory (i.e., the number of cells) is limited by the number of bits in an address. In the diagram above an address consists of 16 bits. Therefore there are 216 = 65,536 possible addresses.

If addresses can be 20 bits long, then the capacity of memory is 220 = 1,048,576 cells, in other words, just over one million cells. We abbreviate this by saying that the capacity of memory is one megabyte or 1 Mb.

If addresses can be 30 bits long, then the capacity of memory is 230 = 1,073,741,824 cells, in other words, just over one billion cells. We abbreviate this by saying that the capacity of memory is one gigabyte or 1 Gb.

Some other cool terms for giant magnitudes are discussed here:

http://www.computerhope.com/issues/chspace.htm

 

Memory performs two operations:

memory.read(address)

This operation outputs the byte stored in the cell with the specified address

memory.write(address, byte)

This operation changes the byte stored in the cell with the specified address to the specified byte.