Computer memory and Addressability
Computer memory consists of main memory (Primary memory) and backing storage (Secondary memory).
Each storage location within the main memory is a little chip. Each location holds one word.
A word is defined by the number of bits that the central processing unit can undertake in a single instruction. The length of the word is decided by the width of the data bus(which also determines how much data is stored in one memory location)because they are equal.
There are two types of memory: RAM – Random Access Memory
ROM – Read Only Memory
Random Access Memory
When the computer is switched off, all the contents stored within RAM is wiped. This type of memory holds mainly data from input peripherals but it also holds data from applications which the computer is running.
There are two types of RAM, static and dynamic.
Static: With static RAM the contents of the memory will be retained until power is no longer supplied to the computer.
Dynamic: Dynamic RAM has to have a continuous signal to be supplied to the chip to re-write (refresh) its contents.
Read Only Memory
The contents of ROM are written to the chips when is it manufactured. When the computer is switched off all the data is retained. It also hold the bootstrap loader. This is part of the operating system.
There are three types of ROM:
PROM – Programmable Read Only Memory
Once it is programmed, it cannot be erased.
EPROM – Erasable Programmable Read Only Memory
Only the chip can be removed from the computer (like PROM) and the program will be erased and replaced by another using UV light
EEPROM – Electrically Erasable Programmable Read Only Memory
Like EPROM, but the program is erased and reprogrammed using electricity.
Temporary Storage-Cache Memory.
This is a small amount of memory built in next to the processor. Due to this, it is physically faster than RAM. It stores the next instruction to be read.
Write-through cache: The contents of the RAM are updated at the same time as the cache contents.
Write-back cache: The contents of the RAM are updated when the contents of the cache are cleared.
Addressability is the way in which a computer identifies memory locations.
The width of the address bus determines how many memory locations can be addressed:
1 bit address bus = 2 memory locations
2 bit address bus = 4 memory locations
3 bit address bus = 8 memory locations
8 bit address bus = 256 memory locations
16 bit address bus = 65536 memory locations
32 bit address bus = 4,294,967,296 memory locations
Calculating addressable memory
To work out the total addressable memory:
Number of storage locations (multiplied by) the Size of each memory location.
16 bit address bus & 8 bit data bus
2^16 bits x 8 bits = 65536 bits x 1 byte
65536 x 1
65536 bytes => 64kB