The Wayback Machine - https://web.archive.org/web/20240930175029/https://www.geeksforgeeks.org/introduction-to-memory-and-memory-units/
Open In App

Introduction to memory and memory units

Last Updated : 12 Aug, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Memory is required to save data and instructions. Memory is divided into cells, and they are stored in the storage space present in the computer. Every cell has its unique location/address. Memory is very essential for a computer as this is the way it becomes somewhat more similar to a human brain. In this article, we are going to discuss memory and memory units in detail.

What is Memory?

Memory devices are digital systems that store data either temporarily or for a long term. Digital computers to hard disks have built-in memory devices that can store the data of users or manufacturers. The data either be in the form of control programs or programs that boot the system. Hence, to store such a huge amount of data the memory devices must have enormous capacity. The challenge is to build memory devices that have large capacities but are cost-effective. The memory devices must be capable of storing both permanent data and instantaneous data.

Memories are made up of registers. Each register in the memory is one storage location. The storage location is also called a memory location. Memory locations are identified using Address. The total number of bits a memory can store is its capacity.  A storage element is called a Cell. Each register is made up of a storage element in which one bit of data is stored. The data in a memory are stored and retrieved by the process called writing and reading respectively. 

Write & Read Operation

A word is a group of bits where a memory unit stores binary information. A word with a group of 8 bits is called a byte. 
A memory unit consists of data lines, address selection lines, and control lines that specify the direction of transfer.

The block diagram of a memory unit is shown below: 

Memory Units

Data lines provide the information to be stored in memory. The control inputs specify the direct transfer. The k-address lines specify the word chosen. 

When there are k address lines, 2k memory words can be accessed. 

Types of Computer Memory

  • Cache memory. This temporary storage area, known as a cache, is more readily available to the processor than the computer’s main memory source. It is also called CPU memory because it is typically integrated directly into the CPU chip or placed on a separate chip with a bus interconnect with the CPU.
  • RAM.  It is one of the parts of the Main memory, also famously known as Read Write Memory. Random Access memory is present on the motherboard and the computer’s data is temporarily stored in RAM. As the name says, RAM can help in both Read and write.
  • D RAM (Dynamic RAM): D RAM uses capacitors and transistors and stores the data as a charge on the capacitors. They contain thousands of memory cells. It needs refreshing of charge on capacitor after a few milliseconds. This memory is slower than S RAM.
  • 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. This memory consists of the number of flip flops with each flip flop storing 1 bit. It has less access time and hence, it is faster.
  • ROM: ROM full form is Read Only Memory. ROM is a non volatile memory and it is used to store important information which is used to operate the system. We can only read the programs and data stored on it and can not modify of delete it.
  • 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.
  • 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.
  • 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.
  • EEPROM (Electrically Erasable Programmable Read Only Memory): Here the written contents can be erased electrically. You can delete and reprogram 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.
  • Virtual memory. A memory management technique where secondary memory can be used as if it were a part of the main memory. Virtual memory uses hardware and software to enable a computer to compensate for physical memory shortages by temporarily transferring data from RAM to disk storage.

What is Primary Memory?

It is also referred to as main memory or internal memory. It is a computer system’s temporary storage component which is directly accessible by the central processing unit (CPU). It houses data for immediate processing.

Characteristics

  • volatile: Data is lost upon power loss.
  • High-speed access.
  • Limited capacity relative to secondary storage.
  • Examples: Random Access Memory(RAM), Read-Only Memory, Cache memory.

Advantages

  • High-speed access: Data can be retrieved and stored very quickly.
  • Directly accessible by CPU: No intermediate steps are required for data transfer.

Disadvantages

  • Volatile: Data is lost when power is turned off.
  • Limited storage capacity: compared to secondary storage, primary memory is relatively small.
  • Expensive: Cost per unit is higher than secondary storage.

Applications

  • Temporary storage
  • Multitasking
  • Buffering
  • Caching

What is Secondary Memory?

Secondary memory or external memory serves as long-term storge for data and programs. Unlike primary memory, it is not directly accessible by the CPU and requires input/output operations.

Characteristics

  • Non-volatile: Data persists even when the system is powered off.
  • slower access speeds compared to primary memory.
  • High storage capacity.
  • Examples: Hard Disk Drives(HDD), Solid-State Drives(SSD), Optical drives(CD, DVD, Blu-ray).

Advantages

  • Non-volatile: Data persists even when the power is turned off.
  • Large storage capacity: can store vast amount of data.
  • Relatively Inexpensive: cost-effective for storing large volumes of data.

Disadvantages

  • Slower access time: Data retrieval is slower compared to primary memory.
  • Requires input/output operations: Data transfer involves additional steps.

Applications

  • Long-term storage
  • Operating system installation
  • Software installation
  • Data backup
  • Media storage

Units of Memory

Memory units are used to measure the size and represent data. Some of the commonly used memory units are:

1. Bit

The first memory location in a computer is bit. The smallest measurement unit for data held in primary memory and storage devices is a bit. Out of the binary values 0 and 1, a bit can only have one.

  • The smallest measurement unit for data in primary memory and storage devices.
  • Represents binary values 0 and 1.

2. Nibble

  • It means the group of 4 bits. 

3. Word

It is a fixed number of bits, it is different from computer to computer, but the same for each device. Compute store information in the form of words. 

  • A fixed number of bits that varies across computers but remains consistent within each device.
  • Used to store information in computers.

4. Bytes

The fundamental unit used to measure data is the byte. It has 8 bits in it. A byte can therefore represent 2 * 8 or 256 values. They determine the size of files, documents, photos, and other kinds of data.

  • The fundamental unit for measuring data, consisting of 8 bits.
  • Represents 256 values and determines file, document, photo, and data sizes.

5. Kilobyte

1024 bytes is equal to one kilobyte. It is widely used to denote small file sizes and data storage capacities. One kilobyte can hold a small image or around 1024 characters of text. It frequently shows up in text documents, spreadsheets, and small image files.

  • Equal to 1024 bytes.
  • Denotes small file sizes and storage capacities.
  • Can hold small images or around 1024 characters of text.

6. Megabyte

A megabyte is 1024 kilobytes in size. It contains more info as compared to a kilobyte. A megabyte can hold longer texts, high-resolution images, and short audio clips. It is used to calculate the size of files comprising music and short films, software packages, and documents. Megabytes are still important and frequently used, even though larger units of measurement are being used more frequently as a result of the growing number of data files.

  • Comprising 1024 kilobytes.
  • Contains more information compared to a kilobyte.
  • Holds longer texts, high-resolution images, and short audio clips.
  • Measures file sizes of music, short films, software packages, and documents.

7. Gigabyte

1024 megabytes is equal to one gigabyte. It has a substantial amount of data storage space. Larger files, such full photo albums, high-definition movies, and software programs can fit within a gigabit. The storage capabilities of hard drives, solid-state drives, and other forms of data storage devices are routinely assessed utilizing this technique.

  • Equal to 1024 megabytes.
  • Offers substantial data storage space.
  • Suitable for larger files, such as full photo albums, high-definition movies, and software programs.

8. Terabyte

A terabyte is made up of 1024 gigabytes. It has a substantial amount of data storing capacity. A terabyte can hold a lot of data in large databases, massive media collections, and enterprise-level storage systems. It is frequently used by data centers, cloud storage services, and external hard drives with large storage capacities. As the demand for large-scale data processing and storage grows, terabytes are becoming more and more important.

  • Comprising 1024 gigabytes.
  • Provides substantial data storing capacity.
  • Holds large databases, media collections, and enterprise-level storage systems.

9. Petabyte

A petabyte is a colossal unit of data storage capacity. A petabyte may hold massive amounts of data, including significant video libraries, sizable databases, and sizable collections of high-resolution pictures. It is often used in data centers, cloud storage, and scientific research that uses a lot of data.

  • A colossal unit of data storage capacity.
  • Stores massive data quantities, like video libraries and large databases.

10. Exabyte (1024 petabytes)

An exabyte is equal to one EB. It has a substantial amount of data storage space. Exabytes can store vast film archives, massive data warehouses, and global internet traffic. It is extensively used in large-scale scientific simulations, cloud computing infrastructures, and enterprise-level storage systems.

  • Equal to 1024 petabytes.
  • Holds vast film archives, data warehouses, and global internet traffic.

11. Zettabyte (1024 exabytes)

A zettabyte. It represents a capacity for data storage that is almost unimaginable. Zettabytes have the capacity to store unfathomably large amounts of data, including worldwide internet content, long-term archival storage, and in-depth global data analysis.

  • Represents an almost unimaginable data storage capacity.
  • Stores worldwide internet content, long-term archival data, and extensive global analysis.

12. Yottabyte

1024 zettabytes make up a yottabyte (abbreviated YB). It stands for an incredible amount of data storage. Unimaginable amounts of data, such as the equivalent of storing all of the material on the internet numerous times or tracking vast amounts, may be stored in yottabytes.

  • Comprising 1024 zettabytes.
  • Stands for an incredible amount of data storage.
  • Can hold vast amounts equivalent to storing internet content numerous times.

Functions of Memory Unit

The memory unit of a computer has several functions:

  • Stores Data and Instructions: The memory unit stores data and instructions needed by the CPU to perform tasks efficiently. This includes data related to operations to be performed and data related to the program.
  • Tracks Interim Results: The memory unit keeps track of the interim results of processing.
  • Saves Final Results: The memory unit saves the final processing results before sending them to an output device.
  • Receives And Transmits Inputs And Outputs: The memory unit receives and transmits all inputs and outputs.

The size of the memory unit affects its speed, power, and capabilities. without a memory unit, the processor would have to wait longer for data retrieval.

Conversions of Units

Name Equal To Size (In Bytes)
Bit 1 Bit 1/8
Nibble 4 Bits 1/2 (rare)
Byte 8 Bits 1
Kilobyte 1024 Bytes 1024
Megabyte 1024 Kilobytes 1, 048, 576
Gigabyte 1024 Megabytes 1, 073, 741, 824
Terabyte 1024 Gigabytes 1, 099, 511, 627, 776
Petabyte 1024 Terabytes 1, 125, 899, 906, 842, 624
Exabyte 1024 Petabytes 1, 152, 921, 504, 606, 846, 976
Zettabyte 1024 Exabytes 1, 180, 591, 620, 717, 411, 303, 424
Yottabyte 1024 Zettabytes 1, 208, 925, 819, 614, 629, 174, 706, 176

Conclusion

Memory is the vital component of a computer system that stores data and instructions for processing. It is divided into various types, each with its specific characteristics and purpose. From the rapid access of RAM to the persistent storage of ROM and the vast capacities of secondary storage, memory units are fundamental to the operation of modern computers.

Memory and Memory Units – FAQs

What is memory unit in CPU?

A memory unit is a little storage device that stores memory of a computer and it can be used by software. Typically, memory units are used to store program information.

Which is the smallest unit of measurement of data?

A bit is the smallest unit of measurement of data. The first memory location in a computer is bit.

What is the role of cache memory?

Cache memory is a small, high-speed memory that stores frequently accessed data for faster retrieval by the CPU.

What is memory bottleneck?

A memory bottleneck occurs when the CPU is waiting for data from memory, limiting overall system performance.



Previous Article
Next Article

Similar Reads

Classification and Programming of Read-Only Memory (ROM)
Read-Only Memory or ROM is another significant non Volatile storage control in computed systems which mainly stores data permanently whether the power is off or not. While RAM is a temporary storage type used in computers and printers, ROM contains firmware and other instructions which are burnt, into the hardware during its manufacturing. This art
15+ min read
One bit memory cell (or Basic Bistable element)
A One Bit Memory Cell (also known as a Basic Bistable Element) is a digital circuit that can store a single bit of information. It is a type of sequential circuit that can hold its state until a new input signal is received, causing the state to change. One Bit Memory Cells are used in digital systems as temporary storage elements and are the build
6 min read
Polymer Memory
Semiconductor memory is a digital electronic semiconductor device used for digital data storage, such as computer memory, where data is stored within metal–oxide–semiconductor (MOS) memory cells on a silicon integrated circuit memory chip. Polymer memory insinuates the new memory innovation that utilizes conductive polymer rather than silicon based
4 min read
What is Memory Decoding?
The digital electronic circuit is a kind of circuit that only processes signal with two states: either zero or one. Transistors in a circuit are used to conduct various Boolean logic. In digital electronics, the memory decoding process took place, when there is a need to access the memory in digital devices. In the process, the binary addresses are
9 min read
8085 Program to Copy a Source Block to Destination Block with Overlapping Memory Address
The task is to copy the data from some source block to some destination block given that the destination block has an overlapping memory address with the source block. Data cannot just simply be moved from source block to destination block because the destination block is having an overlapping memory address, it could lead to overriding of data and
5 min read
Introduction to Digital Systems
A system is a set of related components that work as a whole to achieve a goal. A system contains inputs, behavior and outputs. Behavior is a function that translates inputs to output. Components are electronics blocks - digital, analog, or mixed signal. Digital System is a system in which signals have a finite number of discrete values. Analog Sys
1 min read
Introduction of LED
There are various sources of light, like candles, lamps, etc. Light bulb was invented by Thomas Edison in 1879. Light Emitting Diodes (LED), electronic electrical energy can directly convert into light energy. You can find LEDs in Cars, Bikes, Street Lights, Home Lighting, Office Lighting, Mobile Phones, Televisions and many more. Light is an energ
2 min read
Introduction of BioChip
Biochip is a miniature version of a laboratory, using which more than hundreds of biochemical reactions take place simultaneously. They are specially designed for functioning in a biological environment, especially inside living organisms. It is not an electronic device. Biochips consist of millions of biosensors, which acts as microreactor used fo
4 min read
Introduction of Blue Brain (world's first Artificial Brain)
Artificial Brain is a software or hardware which is similar to functioning of biological human brain in terms of Memory, Feelings, Emotions, and decision making. This can be done using reverse engineering techniques on human brain so functioning of brain can be understood. The structure of human brain is still complex to understand by scientists. M
3 min read
Introduction of Foldable Screens
Foldable screens, once thought to be impossible, but in today’s era nothing seems to be impossible and these foldable screens are a reality in form of foldable phones. This phone becomes a tablet when opened and a pocket-sized smart-phone when folded. But, question is how they achieved such a technological feat. Well, answer is flexible screens; it
3 min read
Introduction of Algorithmic State Machines (ASMs)
Introduction : In digital systems, the binary information is divided into data and control information.Data information is manipulated by various operations like arithmetic, shift, and logic. These operations are implemented by multiplexers, decoders, counters, and shift registers.Control information gives various command signals that help to perfo
4 min read
Introduction of Asynchronous SRAM
The RAM,i.e Random Access Memory is a primary source of data storing memory device for the computers. This memory is available in 2 forms, named as - SRAM(Static RAM)DRAM(Dynamic RAM) Whereas the SRAM is also divided broadly into 2 forms, those are - Synchronous SRAMAsynchronous SRAM In this article, we will study what is Asynchronous SRAM. A thing
3 min read
Introduction of K-Map (Karnaugh Map)
In many digital circuits and practical problems, we need to find expressions with minimum variables. We can minimize Boolean expressions of 3, 4 variables very easily using K-map without using any Boolean algebra theorems. K-map can take two forms: Sum of product (SOP) Product of Sum (POS) According to the need of problem. K-map is a table-like rep
3 min read
Introduction of Floating Point Representation
1. To convert the floating point into decimal, we have 3 elements in a 32-bit floating point representation: i) Sign ii) Exponent iii) Mantissa Sign bit is the first bit of the binary representation. '1' implies negative number and '0' implies positive number. Example: 11000001110100000000000000000000 This is negative number.Exponent is decided by
4 min read
Introduction to logic family
In this article, We will be going through the Logic Family. we will start our article with an introduction to the logic families, then we will go through their classification and go through their characteristics. Also, we will go through the comparison between CMOS, TTL, and ECL logic families. At last, we will conclude our article with the advanta
14 min read
Introduction of Sequential Circuits
Sequential circuits are digital circuits that store and use the previous state information to determine their next state. Unlike combinational circuits, which only depend on the current input values to produce outputs, sequential circuits depend on both the current inputs and the previous state stored in memory elements. Sequential CircuitSequentia
7 min read
Introduction to Clampers
Clamper circuits are essential in electronic circuits because they allow signals to be changed in voltage levels without altering the shape of their waveforms. These circuits are used in many different contexts, such as voltage regulation and signal processing, to modify the location of the signal. What is a Clamper?A Clamper circuit is designed to
5 min read
Introduction to Clippers
A clipper in electronics is a circuit created to stop a signal from going over a specific reference voltage level. The remaining portion of the waveform that is applied is not distorted by a clipper. The clipping of a portion of a wave from an input signal is done with Clipper Circuits. A diode is the main component, and it can be used in series or
14 min read
Introduction of Logic Gates
In Boolean Algebra, there are three basic operations, [Tex]+,\:.\:,\:^\prime [/Tex]which are analogous to disjunction, conjunction, and negation in propositional logic. Each of these operations has a corresponding logic gate. Apart from these, there are a few other logic gates as well. It was invented by George Boole. Table of Content What is a Log
9 min read
Analysis and Design of Combinational and Sequential circuits
1. Analysis and Design of Combinational circuits: To design of combinational circuits, the procedure involves the following steps: Find the required number of inputs and outputs and assign a symbol to each. Derive the truth table according to given specifications and function. Using the truth table, obtain simplified Boolean functions for each outp
2 min read
VHDL code for AND and OR Logic Gates
Prerequisite - Introduction of Logic Gates Design and implement the AND and OR logic gates using VHDL (VHSIC Hardware Description Language) programming language. Different Types of VHDL Modelling Styles The architecture of VHDL code is written in three different coding styles : Dataflow Modelling Behavioral ModellingStructural Modelling 1. Logic De
2 min read
Implementation of XOR Gate from AND, OR and NOT Gate
In this article, we will discuss the implementation of XOR gate using AND, OR and NOT Gate. We will discuss about the AND, OR, XOR and NOT gates, and with it, we will discuss about their operations, logic diagrams and truth table. After understanding the gates and their operation we will use those gates to design a combinational circuit to replicat
5 min read
Difference Between AND Gate and OR Gate
AND gate and OR gate are basic logic gates. AND gate outputs 1 when all inputs are 1 else output 0. OR gate outputs 1 when at least one input is 1 else output 0. The main difference between AND gate and OR gate is that AND gate represents logical conjunction whereas OR gate represents logical disjunction. In this article we will explore difference
4 min read
Digital Electronics and Computer Organisation
Digital Electronics Half Adder Half Subtractor K-Map Counters Computer Organisation and Architecture Machine Instructions What’s difference between 1’s Complement and 2’s Complement? Addressing Modes Cache Memory Computer Arithmetic | Set – 1 Computer Arithmetic | Set – 2 Cache Organization | Set 1 (Introduction) Pipelining | Set 1 (Execution, Stag
1 min read
Difference between Unipolar, Polar and Bipolar Line Coding Schemes
Data as well as signals that represents data can either be digital or analog. Line coding is the process of converting digital data to digital signals. By this technique we converts a sequence of bits to a digital signal. At the sender side digital data are encoded into a digital signal and at the receiver side the digital data are recreated by dec
7 min read
Difference between combinational and sequential circuit
Combinational circuits are defined as the time independent circuits which do not depends upon previous inputs to generate any output are termed as combinational circuits. Sequential circuits are those which are dependent on clock cycles and depends on present as well as past inputs to generate any output. Combinational Circuit - In this output depe
1 min read
Differences between Synchronous and Asynchronous Counter
There are two types of counters in digital logic circuit that are used to count the numbers of bits and these types depends upon the clock pulse applied to the flip flops. 1. Asynchronous Counter: These are the counters in which we do not use universal clock, main clock is only applied to the first flip flop and then for rest of flip flops the outp
2 min read
Adders and Subtractors in Digital Logic
Subtraction of two binary numbers can be accomplished by adding 2's complement of the subtrahend to the minuend and disregarding the final carry if any. If the MSB bit in the result of addition is a '0'. then the result of addition is the correct answer. If the MSB bit is a '1'. , this implies that the answer has a negative sign. The true magnitude
4 min read
Signal Processing and Time Series (Data Analysis)
Signal processing is a field of engineering that focuses on analyzing analog and digital signals with respect to time. Time Series Analysis is one of the categories of signal processing. A time series is a sequence of data points recorded at regular intervals of time. Time series analysis is an important step before you develop a forecast of the se
6 min read
Characteristics and Benefits of Digital System
Important characteristics of Digital System are as following below: Data is represented in a digital system as a vector of binary variables.Digital Systems can provide accuracy (dynamic range) limited only by the number of bits used to represent a variableDigital systems are less prone to error than analog systems.Data representation in a digital s
2 min read
Article Tags :