Memory is a component that is used to store data or information on the computer. It 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 of memory are
- Volatile Memory
- Non-volatile Memory
Volatile memory is computer memory that stores and keeps the information only when the system has power. If the system power turns off, then all the information within the volatile memory are erased automatically. It is a fast accessible memory compared to Non-volatile memory. It can hold only smaller amount of data relative to non-volatile memory for the same cost. RAM (Random Access Memory) and, cache memory are examples of this volatile memory. Cache is faster but costlier relative to RAM
Non-volatile memory is a type of computer memory that stores and keeps the information even when the system has lost its power. It 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 Size0 Table of computer memory - Computer Memory Size Chart - All Computer Memory Sizes
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 that is used to represent the data in the computer. A bit refers to one of the two possible values either 0's or 1's. It is the smallest measurement unit of a computer.
A nibble is defined as a group of 4 bits.
A byte is the group of 8 bits which is referred to as the smallest unit of the computer memory.
A word is defined as a group of the fixed size of bits. The 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. The 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 that are
- Primary memory
- Register memory
- Cache memory
- Main memory
- Secondary Storage
Registers are the very fast memory which is part of the computer processor or CPU. It is used to store the data or instruction during the execution of the program. The size of these registers is small when compared to other memory that can hold 8-bits, 32-bits, or 64-bits. They are very costlier than cache and others. In all computer, most of the arithmetic operation are manipulated by getting data from the register, 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 registersSpecial purpose registers
- IR - Instruction register
- MDR - Memory Data Register
- MAR - Memory Address Register
- PC - program counter
It is the fastest memory than the main memory. The CPU's processor processes the data at high speed but accessing of data or the next instruction from memory is slow. Because of this slower clock speed, it is necessary to have the fastest memory that is called cache memory. The cache memory acts as a buffer between RAM and the CPU. It stores frequently used data and instruction which are available for CPU to use shortly.
The 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 again use. The capacity of cache memory is smaller and costlier than the main memory.
It is also referred to as internal memory 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. It can be either volatile or non-volatile memory. The main memory is broadly divided into two types that are
- RAM(Random Access Memory)
- ROM(Read-Only Memory)
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.