Introduction to Programming - (C Language) - Unit : 1 - Computer Memory

 

COMPUTER MEMORY

Computer memory is just like the human brain. It is used to store data/information and instructions. It is a data storage unit or a data storage device where data is to be processed and instructions required for processing are stored. It can store both the input and output can be stored here.

Characteristics of Computer Memory

Ø  It is faster computer memory as compared to secondary memory.

Ø  It is semiconductor memories.

Ø  It is usually a volatile memory, and main memory of the computer.

Ø  A computer system cannot run without primary memory. 

Types of Computer Memory

In general, computer memory is of three types:

1.     Primary memory

2.     Secondary memory

3.     Cache memory

4.     Register memory 

Now we discuss each type of memory one by one in detail:

1. Primary Memory

It is also known as the main memory of the computer system. It is used to store data and programs or instructions during computer operations. It uses semiconductor technology and hence is commonly called semiconductor memory. Primary memory is of two types:

Ø  RAM (Random Access Memory): It is a volatile memory. Volatile memory stores information based on the power supply. If the power supply fails/ interrupted/stopped, all the data and information on this memory will be lost. RAM is used for booting up or start the computer. It temporarily stores programs/data which has to be executed by the processor. RAM is of two types:

o   S RAM (Static RAM): S RAM uses transistors and the circuits of this memory are capable of retaining their state as long as the power is applied.

o   D RAM (Dynamic RAM): D RAM uses capacitors and transistors and stores the data as a charge on the capacitors.

Ø  ROM (Read Only Memory): It is a non-volatile memory. Non-volatile memory stores information even when there is a power supply failed/ interrupted/stopped. ROM is used to store information that is used to operate the system. The information stored in the ROM in binary format. It is also known as permanent memory. ROM is of four types:

o   MROM(Masked ROM): Hard-wired devices with a pre-programmed collection of data or instructions were the first ROMs. Masked ROMs are a type of low-cost ROM that works in this way.

o   PROM (Programmable Read Only Memory): This read-only memory is modifiable once by the user. The user purchases a blank PROM and uses a PROM program to put the required contents into the PROM. Its content can’t be erased once written.

o   EPROM (Erasable Programmable Read Only Memory): EPROM is an extension to PROM where you can erase the content of ROM by exposing it to Ultraviolet rays for nearly 40 minutes.

o   EEPROM (Electrically Erasable Programmable Read Only Memory): Here the written contents can be erased electrically. You can delete and reprogramme EEPROM up to 10,000 times. Erasing and programming take very little time, i.e., nearly  4 -10 ms(milliseconds). Any area in an EEPROM can be wiped and programmed selectively.

2. Secondary Memory

It is also known as auxiliary memory and backup memory. It is a non-volatile memory and used to store a large amount of data or information. The data or information stored in secondary memory is permanent, and it is slower than primary memory. A CPU cannot access secondary memory directly. The data/information from the auxiliary memory is first transferred to the main memory, and then the CPU can access it.

Characteristics of Secondary Memory

Ø  It is a slow memory but reusable.

Ø  It is a reliable and non-volatile memory.

Ø  It is cheaper than primary memory.

Ø  The storage capacity of secondary memory is large.

Ø  A computer system can run without secondary memory.

Ø  In secondary memory, data is stored permanently even when the power is off.

Types of Secondary Memory

1.      Magnetic Tapes: Magnetic tape is a long, narrow strip of plastic film with a thin, magnetic coating on it that is used for magnetic recording. Bits are recorded on tape as magnetic patches called RECORDS that run along many tracks.

2.      Magnetic Disks: A magnetic disk is a circular metal or a plastic plate and these plates are coated with magnetic material. The disc is used on both sides.

3.      Optical Disks: It’s a laser-based storage medium that can be written to and read. It is reasonably priced and has a long lifespan.

Types of Optical Disks

CD – ROM : It’s called compact disk. Only read from memory. Information is written to the disc by using a controlled laser beam to burn pits on the disc surface.

DVDs : The term “DVD” stands for “Digital Versatile/Video Disc,” and there are two sorts of DVDs:

Ø  DVDR (writable)

Ø  DVDRW (Re-Writable)

3. Cache Memory

It is a type of high-speed semiconductor memory that can help the CPU run faster. Between the CPU and th main memory, it serves as a buffer. It is used to store the data and programs that the CPU uses the most frequently.

Advantages of Cache Memory

Ø  It is faster than the main memory.

Ø  When compared to the main memory, it takes less time to access it.

Ø  It keeps the programs that can be run in a short amount of time.

Ø  It stores data in temporary use.

 

4.      Register memory

Registers are the smallest data holding elements that are built into the processor itself. These are the memory locations that are directly accessible by the processor. It may hold an instruction, a storage address or any kind of data such as a bit sequence or individual characters. For example, an instruction may specify that the contents of two defined registers be multiplied together and then placed in a specific register.

Example: Accumulator register, Program counter, Instruction register, Address register, etc.

Comments

Popular posts from this blog

How to Get a Job in Top IT MNCs (TCS, Infosys, Wipro, Google, etc.) – Step-by-Step Guide for B.Tech Final Year Students

Common HR Interview Questions

How to Get an Internship in a MNC