Computer memory is the measurement of space (capacity) of a memory device which is required to store and process data. Memory is an important component of computer system. Memory devices are the place where we store our digital data files like images, songs, pdf etc and CPU information files like BIOS information, operating system and variou software files important for our computer to run.
There are mainly two types of computer memory
- Primary Memory
- Secondary Memory
Primary Memory
This type of memory is used to store important files and executables required by the CPU while running system and software applications. Primary memory is also known as main memory, these are semiconductor memories.
Primary memory is mainly divided into two types:-
RAM
Random Access Memory: This primary memory is volatile in nature means all the memory stored on such devices will erase once system is powered off.
There are two types of RAM
- SRAM (Static RAM)
- DRAM ( Dynamic RAM)
ROM
Read Only Memory : This type of computer memory is non-volatile in nature and is read only means CPU can not write data on such memory devices.
Types Of ROM
- MROM (Masked ROM)
- PROM (Programmable ROM)
- EPROM (Eraseable Programmable ROM)
- EEPROM (Electrically Erasable Programmable ROM)
RAM vs ROM
RAM | ROM |
---|---|
It is volatile in nature, data stored is temporary and is lost after powered off. | It is non-volatile in nature, retains data permanently. |
It is more expensive to buy. | It is less expansive than RAM. |
Data transfer speed is incredibly fast. | Data transfer is much slower. |
Size and capacity is compairitively large. | ROM have low capacity and are smaller in size. |
CPU can read and write on RAM storage. | ROM is a read only memory it cannot be written by CPU. |
Secondary Memory
This type of memory is also known as external storage and are used to store data files. These memory devices are less expensive than primary memory.
It is slower in speed than primary memory, and do not directly interact with CPU.
These memory devices are non-volatile, they store the data persistently.
Types of secondary memory
- HDD
- SSD
- USB Drive
- DVD
- CD
- Floppy Disks
Cache Memory
Cache memory also known as CPU memory and sits in between the computer Main Memory and CPU itself. It is volatile in nature and stores frequently used data files require for faster processing.
CPU first searches cache memory for information it needs if not found then it reaches to primary memory.
It is mostly embeded on motherboard closer to processor or on the processor itelf to make the data transfer extremely fast. Generally SRAM is used as Cache memory.
Cache memory is further divided into three levels
Level 1 (L1) is the fastest cache level and relatively smaller in memory size.
Level 2 (L2) is slower tha L1 but faster than L3.
Level 3 (L3) is the slowest of three and have more memory than L1 and L2.
Memory Units
Digital computers can only undersatand the language of ‘ 0 and 1’ at lower level.
‘0’ is the passive state here electrical signal is absent and ’1’ is the active state here electrical signal is present.
smallest memory unit is one bit (Binary digit), it describes the state of memory cells on storage device i.e. 0 or 1.
Quantity | Unit |
---|---|
0 or 1 | 1 Bit |
4 bits | 1 Nibble or ½ Byte |
8 Bits | 1 Byte |
1024 Bytes | 1 KB (Kilobyte) |
1024 KB | 1 MB (Megabyte) |
1024 MB | 1 GB (Giga Byte) |
1024 GB | 1 TB (Terabyte) |
1024 TB | 1 PB (Petabyte) |
1024 PB | 1 EB (Exabyte) |
1024 EB | 1 ZB (Zettabyte) |
1024 ZB | 1 YB (Yottabyte) |