Detailed Lecture Notes: Memory Elements
Prepared from:
1. Digital Fundamentals by Thomas L. Floyd (11th Edition)
2. Fundamentals of Digital Logic with Verilog Design by Stephen Brown (2nd Edition)
1. Introduction to Memory Elements
Memory elements are electronic devices used to store binary information in digital systems.
They are fundamental components of computers, microprocessors, embedded systems, and
communication devices. Memory devices store instructions, data, and intermediate
processing results.
A memory system is generally composed of many storage locations, where each location can
hold one bit or a group of bits. The CPU communicates with memory through address lines,
data lines, and control lines.
2. Basic Memory Terminology
Bit: The smallest unit of data represented as 0 or 1.
Byte: A group of 8 bits.
Word: A fixed-sized group of bits processed together by the CPU.
Address: A unique location identifier in memory.
Read Operation: Retrieving data from memory.
Write Operation: Storing data into memory.
Access Time: Time required to read or write data.
Memory Capacity: Total amount of data the memory can store.
3. Classification of Memory Elements
Memory devices are broadly classified into two categories:
Volatile Memory: Loses stored data when power is removed.
Non-Volatile Memory: Retains stored data even after power is turned off.
4. Random Access Memory (RAM)
Random Access Memory (RAM) is a volatile memory used for temporary storage of data and
programs currently being executed by the CPU. RAM allows both read and write operations
and provides fast data access.
4.1 Structure of RAM
RAM consists of memory cells arranged in rows and columns. Each memory location has a
unique address. The major components of RAM include:
Memory Cell: Stores one bit of data.
Address Decoder: Selects a specific memory location.
Data Lines: Transfer data to and from memory.
Control Lines: Control read and write operations.
Sense Amplifier: Detects and amplifies stored data values.
4.2 Functioning of RAM
1. The CPU places the memory address on the address bus.
2. The address decoder selects the corresponding memory location.
3. For a write operation, data from the CPU is stored in the selected location.
4. For a read operation, stored data is transferred to the CPU through data lines.
4.3 Types of RAM
Static RAM (SRAM): Uses flip-flops to store data. It is faster, more reliable, and does not
require refreshing. However, it is expensive and consumes more power.
Dynamic RAM (DRAM): Uses capacitors to store data. Requires periodic refreshing
because capacitors lose charge over time. DRAM is cheaper and has higher storage
density.
5. Read Only Memory (ROM)
Read Only Memory (ROM) is a non-volatile memory used for permanent storage of
firmware and system instructions. Data stored in ROM remains even when power is
removed.
5.1 Structure of ROM
ROM consists of fixed memory cells arranged in matrix form. Connections between rows
and columns determine stored binary values.
Memory Array: Stores permanent binary data.
Address Decoder: Selects memory locations.
Output Buffer: Transfers data to output lines.
Control Logic: Controls read operations.
5.2 Functioning of ROM
5. The CPU sends an address to ROM.
6. The address decoder selects the required location.
7. Stored data is read from the selected memory cell.
8. The output buffer transfers the data to the CPU.
5.3 Types of ROM
Mask ROM: Programmed during manufacturing and cannot be modified.
PROM: Programmable once by the user.
EPROM: Can be erased using ultraviolet light and reprogrammed.
EEPROM: Can be electrically erased and reprogrammed multiple times.
6. EEPROM (Electrically Erasable Programmable ROM)
EEPROM is a special type of non-volatile memory that can be electrically erased and
reprogrammed. Unlike EPROM, EEPROM does not require ultraviolet light for erasing.
6.1 Structure of EEPROM
EEPROM uses floating-gate transistors for data storage. Each memory cell contains a
transistor capable of retaining electrical charge.
Floating-Gate Transistor: Stores charge representing binary data.
Control Gate: Controls programming and erasing operations.
Tunnel Oxide Layer: Allows electrons to move during programming.
Address Decoder: Selects memory locations.
Control Circuitry: Controls erase and write operations.
6.2 Functioning of EEPROM
9. Programming: Electrical charge is stored in the floating gate.
10. Reading: The stored charge determines transistor conduction state.
11. Erasing: Electrical signals remove stored charge from the floating gate.
7. Comparison of RAM, ROM, and EEPROM
Feature RAM ROM EEPROM SRAM DRAM
Volatility Volatile Non-Volatile Non-Volatile Volatile Volatile
Read/Write Yes Read Mostly Yes Yes Yes
Speed Fast Moderate Slower Very Fast Moderate
Power Needs No Power No Power High Low
Requiremen Power Needed Needed
t
Storage Medium Medium High Low High
Density
Applications Main Firmware Configuratio Cache Main
Memory n Data Memory Memory
8. Applications of Memory Elements
Main memory in computers
Cache memory in processors
Firmware storage in embedded systems
Microcontroller programming
BIOS storage
Configuration data storage
Mobile phones and digital devices
9. Advantages and Disadvantages
Advantages
Fast data access
Reliable storage of information
Essential for digital processing systems
Supports temporary and permanent data storage
Disadvantages
RAM loses data when power is removed
EEPROM has limited write cycles
ROM cannot be modified easily
Some memory devices are expensive
10. Conclusion
Memory elements are fundamental components of digital systems. RAM provides fast
temporary storage, ROM stores permanent instructions, and EEPROM allows flexible non-
volatile storage. Understanding their structure and functioning is essential for the design
and operation of modern digital electronics.
Suggested Reading
• Thomas L. Floyd, Digital Fundamentals, 11th Edition
• Stephen Brown, Fundamentals of Digital Logic with Verilog Design, 2nd Edition