Addressability is the way in which the computer identifies different memory locations.
The size (width) of the address bus determines how many memory locations can be addressed. For example , a 1 bit address bus can access 2 memory locations; a 2 bit address bus can access 4 memory locations and a 3 bit address bus can access 8 memory locations and so on.
In order to know how much memory we are actually accessing, we must know how many bits can be held in each storage location. This is determined by the width of the data bus. For example, a computer with a 2 bit data bus would store 2 bits in each memory location.
Calculating Addressable Memory
Total addressable memory = ‘the number of storage locations’ x ‘the size of each storage location’
A computer with a 2 bit data bus (stores 2 bits per memory location) and a 3 bit address bus (accesses 8 memory locations) would have an addressable memory of:
2 x 8 = 16 bits
=> 2 bytes
Main memory (or primary memory) is held on chips.
Backing storage (or secondary memory) is not part of the computers main memory.
Main memory consists of many storage locations which are identified by unique addresses.
Each individual storage location holds one word ( the number of bits that the central processing unit can process in one operation).
There are two types of main memory:
- RAM – Random Access Memory
- ROM – Read Only Memory
RAM memory holds data and/or application programs from input devices or the backing storage and sometimes holds the OS (operating system).
When the computer is switched off, RAM is completely wiped out.
There are 2 types of RAM:
- Static RAM (SRAM) – The memory in SRAM will remain as long as power is supplied to the chips i.e as long as the computer is switched on
- Dynamic RAM (DRAM) – A continuous signal is needed for DRAM to refresh/ re-write it’s contents
SRAM is faster for the computer to access than DRAM. However, RAM is mainly made up of DRAM because it uses simpler circuits and is more economical in terms of power i.e requires less power in order to operate.
ROM has contents which are written on to it when it is being manufactured and thus cannot be re-written. ROM also holds the bootstrap loader part of the OS which is crucial when starting the computer up. Unlike RAM , ROM keeps all data that it holds even when the computer is switched off.
There are 3 different types of ROM:
- Programmable ROM (PROM) – This type of ROM has no pre-written data on it and is empty so that the user can program it. However , once written, the data cannot be erased
- Erasable PROM (EPROM) – This is the same as PROM except it can be removed from the computer, have it’s data erased and have another put in it’s place using UV (Ultra-Violet) light.
- Electrically EPROM (EEPROM) – The same as EPROM except electricity is used to erase and re-write selected contents
Cache memory is used because reading/writing to and from memory can decrease the quality of the system’s performance and cache is used as a form of temporary memory. Cache is a small amount of memory built in to the processor and uses SRAM. Cache is physically closer to RAM and stores the next set of instructions to be read. Cache can come in two forms:
- Write through cache – This is when the contents of the RAM are updated at the same time as the contents of the cache
- Write back cache – This is when the contents of the RAM are updated only when the contents of the cache are cleared
Registers are another form of temporary memory outside of RAM. Registers are storage locations inside the processor which hold the data being processed (Memory Data Register); addresses of memory locations to be accessed ( Memory Address Register); Instructions being executed (Instruction Register). It should be noted that there are many other registers and that registers are faster to access than RAM and cache memory locations.
Part of the hard disk (secondary memory) is set aside to be used as virtual memory.
The disk are is used as a temporary storage location for programs and data and comes in handy when the computer does not have enough RAM to store an entirte program and it’s data. It is slower to acces than data in main memory.
Comparing Different Memory Types
The speed at which data can be accessed depends upon the physical distance between the data and the processor.
In order of fastest access to slowest access :
- Cache memory
- Virtual memory
Thanks for reading, Lee.