Computer Memory and its Function
Compter Memory is a component used to store data or information on the computer.
- Computer Memory is made up of semiconductor material, typically MOS (Metal Oxide Semiconductor) organized as a cell.
- Each memory cell can store one bit (0 or 1 ) of information.
- Also, each cell has a unique address that varies from 0 to memory size minus one.
- For example, if the memory size is 1k, then it varies from 0 to 1023 ( i.e., 1 x 1024= 1024 memory size ).
Two Kinds or Two Types of Memory
- Primary Memory - Volatile temporary memory RAM and Non-Volatile permanent ROM
- Secondary Memory - Non-volatile Memory
Primary Memory - RAM and ROM
RAM and Cache memory are popular examples of Primary Memory. RAM is Volatile and ROM is non-volatile.
Volatile memory is computer memory that stores and keeps the information only when the system has electric power. If the system power turns off, then all the data and instruction within the volatile memory are erased automatically. Primary memory or volatile memory RAM is a fast accessible memory compared to Non-volatile memory. Primary memory can hold only smaller amount of data relative to secondary non-volatile memory for the same cost. RAM is Random Access Memory.Primary Memory - Volatile
|Popular Sizes||1GB to 16GB||32KB or 64KB||32 or 64 bit|
|Popular Speeds||1333MHz, 3200MHz Fast||2,4,6 or 8KiB L1 cache Faster||2 to 3 times faster than Cache|
|Cost||Less costlier for its size||Costlier than RAM||Costliest compared to RAM and Cache|
Secondary Non-volatile memory is a type of computer memory that stores and keeps the information even when the system has lost its power. Secondary Memory can hold a large volume of data. ROM (Read Only Memory), PROM, EPROM, etc are examples of the non-volatile memory.
How to Measure Computer Memory? - Computer Memory Size
Data is stored in computer memory. Amount of data stored stored in memory is dependent on its size.
The following terms define the memory units:
- Bit is a binary digit used to represent the data in the computer.
- A bit refers to one of the two possible values either 0's or 1's.
- Bit is the smallest measurement unit of a computer.
A nibble is defined as a group of 4 bits.
A byte is a group of 8 bits referred to as the smallest unit of the computer memory.
Table of computer memory - Computer Memory Size Chart - All Computer Memory Sizes
A word is defined as a group of the fixed size of bits.
- Computer memory stores the data in the form of a word.
- The number of bits in a word is called word length or word size.
- Word length can vary from computer to computer.
- Common word length used in computers are 1, 8, 16, 32, and 64 bits.
- Modern computers use the word length of 32 bits or 64 bits.
A kilo byte consists of 1024 bytes. e.g 1 KB = 1024 Bytes.
A mega byte consists of 1024 kilo bytes. e.g 1 MB = 1024 KB.
A giga byte consists of 1024 mega bytes. e.g 1 GB = 1024 MB.
A tera byte consists of 1024 giga bytes. e.g 1 TB = 1024 GB.
Types of Memory
Memory chip can be located in different places within the computer. Based on this location and size, computer memory categorized into two major types of memory that are
- Primary memory
- Register memory
- Cache memory
- Main memory or RAM
- Secondary Storage
Registers are the very fast memory which is part of the computer processor or CPU.
- Register is used to store the data or instruction during the execution of the program.
- Size of these registers is small when compared to other memory that can hold 8-bits, 32-bits, or 64-bits.
- Register memory is costlier than cache, RAM and all kinds of memory.
- In computers, most arithmetic operations are manipulated by getting data from the registers, and the intermediate results are stored in the register.
- The most commonly used registers are Accumulator, general-purpose registers (R0 to R9), and special purpose registers
- IR - Instruction register
- MDR - Memory Data Register
- MAR - Memory Address Register
- PC - program counter
Cache memory is the fastest memory than the main memory.
- CPU processor processes the data at highest speed in memory registers but accessing of data for the next instruction from RAM memory is slow. In order to make accessing next
- Cache memory acts as a buffer between RAM and the CPU. Cache stores frequently used data and instruction available for CPU to access faster.
Cache memory is used to reduce the access time of data than the main memory. Whenever CPU wants to execute the instruction, first it checks the cache memory whether the instruction is available or not. If it finds the instruction in the cache, it accesses that instruction without referring the main memory. Suppose if it is not in the cache, then that instruction will be accessed from the main memory location and also keeps the copy of that information in the cache for further use. The capacity of cache memory is smaller and costlier than the main memory.
Main memory or RAM is also referred to as internal memory or system memmory of the computer. Whenever the computer turns on, this memory can store the data and information that is required for the proper working of the computer. Also, the CPU can directly perform read or write operations on this memory. Main memory can be either volatile or non-volatile memory. The main memory is broadly divided into two types that are
- RAM(Random Access Memory) - Volatile
- ROM(Read-Only Memory) - Non-volatile
In general, this memory module is connected to the memory slot on the motherboard of the computer.
RAM - Random Access Memory - Computer Memory RAM
Computer Memory RAM is the fastest memory that gives workspace for our program to run.
- Computer Memory RAM can provide temporary storage for information and data.
- The information stored in RAM is lost when the system is shut down. Hence, RAM is called a volatile memory.
- RAM is necessary for the proper functioning of the computer.
- Without RAM, the computer is useless.
- RAM is expensive than secondary memory but cheaper than the cache memory.
RAM has two types
- SRAM (Static RAM)
- DRAM (Dynamic RAM)
ROM - Read Only Memory - Computer Memory ROM
Computer Memory ROM stands for Read Only Memory.
- ROM is an Integrated Chip(IC) made up of semiconductor material.
- ROM memory stores the information and data provided by the computer systems manufacturers.
- In Simple terms, it keeps firmware information. Firmware is a software program that is necessary for the hardware devices to communicate with one another.
- ROM contains instructions for basic input/output devices, hard drives, BIOS information, video card, etc.) that can be erased and rewritten.
- ROM keeps the information and data even when the system has no power supply or shut down.
- ROM is called non-volatile memory. Therefore, the program and data stored in the ROM memory is permanent.
- Data in ROM can be read-only by the CPU and not by the user.
- Different kinds of ROMs available that are PROM, EPROM, and EEPROM.
Secondary Memory or Storage
Secondary Memory is a storage device that can provide permanent storage for data and programs. We can simply call it as storage.
- Secondary Memory is very slow, inexpensive, and long lasting storage medium.
- Secondary Memory can provide a large amount of storage space.
- Examples of these storage devices are Hard Disk, Solid State Disk (SSD), floppy disk, hard disk, optical disk likes CD, DVD, Blue-ray disk. We also have External Hard Disks and USB storage drives
- Secondary Storage is sometimes called as auxiliary storage.
- Internal Hard disk, Solid State Disk SSD, External Hard drive, USB flash drive are more popular nowadays and CD and DVD slowly reducing in use and popularity.
Memory - Summary
RAM - Random Access Memory
RAM is like the brain of the computer that loses its storage on power OFF and starts storing fresh once again on computer power ON. All that computer has to process, has to be placed in memory. Without RAM, computer cannot work.
Processor Cache is also volatile memory and faster and costlier than RAM.
Processor Memory Register
Registers are located within the processor and is the fastest and costliest memory compared to Cache and RAM
A computer usually has 32 or 64 bit register memory, 32KB or 64KB Cache memory, 1GB to 16GB RAM.
Nowadays, 500GB, 1TB or even 2TB internal hard disk or 500GB SSD are becoming more popular. External hard drives of 1TB is more used for data backup. 8GB to 64GB USB flash drive is used to carry Data much easier