Memory and Storage: RAM, ROM, Cache and Units
Computer memory and storage for competitive exams: the memory hierarchy, SRAM and DRAM, the ROM family, cache, virtual memory, disc capacities and storage units.
By GK24 Editorial Team· Published · 5 min read

Every piece of data a computer works with has to be kept somewhere, and the chain of places it can be kept — from a register inside the processor to a magnetic tape in a vault — is called the memory hierarchy. Paper setters return to this chapter every year because the hierarchy is a ladder on which four properties always move together: the closer a memory sits to the processor, the faster, the smaller, the costlier per byte and the more volatile it is; the further away it sits, the slower, the larger, the cheaper and the more permanent it becomes. Learn the ladder once and most questions answer themselves.
The memory hierarchy, level by level
A register is the fastest storage in the machine. It sits inside the CPU itself, holds the single word of data that the arithmetic and logic unit is working on at that instant, and is measured in bytes. Cache memory comes next: a small, very fast store built from static RAM that keeps the instructions and data the processor has used most recently, so the CPU need not wait for the slower main memory. Primary or main memory is the RAM and ROM on the motherboard, which the processor can address directly. Secondary storage — hard disks, solid state drives, pen drives and discs — keeps programs and files permanently, but the processor cannot read it directly; its contents must first be copied into RAM. Tertiary or offline storage, such as magnetic tape, is meant for backup and archiving.
| Level | Example | Speed and size |
|---|---|---|
| Register | Accumulator, program counter | Fastest; a few bytes |
| Cache | L1, L2 and L3 cache | Very fast; kilobytes to megabytes |
| Main memory | DRAM module, ROM chip | Fast; gigabytes |
| Secondary | Hard disk, SSD, pen drive | Slower; gigabytes to terabytes |
| Tertiary | Magnetic tape | Slowest; archives and backups |
RAM, the volatile working memory
Random Access Memory is read-write memory: the processor can both fetch from it and write into it, and every location takes the same time to reach, which is exactly what random access means. RAM is volatile, so switching the power off wipes it clean. It comes in two families. Static RAM stores each bit in a flip-flop made of transistors, needs no refreshing, is very fast and very costly, and is therefore used as cache. Dynamic RAM stores each bit as a charge on a tiny capacitor that leaks away, so the circuit must refresh every cell thousands of times a second; it is slower but far denser and cheaper, which is why the main memory of every computer is DRAM. SDRAM and the DDR, DDR2, DDR3 and DDR4 modules are successive generations of synchronous DRAM.
| Point of comparison | SRAM | DRAM |
|---|---|---|
| Storage element | Flip-flop of transistors | Capacitor |
| Refreshing | Not required | Required constantly |
| Speed and cost | Faster and costlier | Slower and cheaper |
| Normally used as | Cache memory | Main memory |
ROM and its family
Read Only Memory is non-volatile: it keeps its contents without power and is not written to in ordinary use. It holds what the machine needs the moment the switch is thrown, the bootstrap loader and the BIOS, which is why the contents of ROM are called firmware. Four members of the family are asked in pairs. MROM is masked ROM, written permanently by the manufacturer. PROM can be programmed once by the user with a PROM burner and never again. EPROM is erased by exposing its quartz window to ultraviolet light, after which it can be rewritten. EEPROM is erased and rewritten electrically, byte by byte, without taking the chip out of the circuit; flash memory is a fast, block-erasable form of EEPROM, and pen drives, memory cards and solid state drives are all built from it.
Cache hits and virtual memory
When the processor asks for a word and finds it in cache the event is a cache hit; when it does not, it is a cache miss and the word must be fetched from main memory. Processors use several levels: L1 inside each core and smallest, then L2, then a larger L3 shared between cores. Virtual memory works the other way round. When RAM runs short the operating system moves inactive pages to a reserved area of the hard disk, the swap space or page file, so that programs larger than the physical RAM can still run. It makes the machine behave as though it had more RAM than it does, at the cost of speed.
Secondary storage and its three technologies
Secondary storage is grouped by the physics it uses. Magnetic devices magnetise a coating: the hard disk with its rotating platters, read-write heads, tracks, sectors and cylinders, the old floppy disk, and magnetic tape, the one common device with sequential access. Optical devices burn and read pits with a laser: the compact disc at 700 MB, the DVD at 4.7 GB for a single-sided single-layer disc, and the Blu-ray disc at 25 GB a layer. Flash or solid state devices have no moving parts at all and trap charge in floating-gate cells: pen drives, SD cards and SSDs, which are faster, silent and far more resistant to shock than a hard disk.
Units of storage
A bit is one binary digit, 0 or 1. Four bits make a nibble and eight bits a byte, the space one character needs. Above the byte each step multiplies by 1,024, which is 2 raised to the power 10: 1,024 bytes make a kilobyte, 1,024 KB a megabyte, 1,024 MB a gigabyte, 1,024 GB a terabyte, and the ladder runs on through petabyte, exabyte, zettabyte and yottabyte. The word length is the number of bits a processor handles at one time, 32 or 64 bits in current machines.
Exam Point of View
Five question families cover this chapter. The first asks which memory is fastest, where the answer is the register unless registers are absent from the options, in which case it is cache. The second asks for a volatile or non-volatile classification, so keep RAM on one side and ROM, flash, disk and disc on the other. The third is arithmetic on units: bits in a nibble or a byte, kilobytes in a megabyte, gigabytes in a terabyte. The fourth is the ROM family, and the trap is to swap EPROM with EEPROM: ultraviolet light erases EPROM, an electrical signal erases EEPROM. The fifth asks for a capacity, so memorise 1.44 MB, 700 MB, 4.7 GB and 25 GB as a set. A sixth, rarer type asks which storage is sequential, and the answer is magnetic tape.
Important Facts
| Fastest memory | Register, inside the CPU |
|---|---|
| Cache memory is built from | Static RAM (SRAM) |
| Main memory is built from | Dynamic RAM (DRAM), which needs constant refreshing |
| Volatile memory | RAM; its contents are lost when the power goes off |
| EPROM erased by | Ultraviolet light through a quartz window |
| EEPROM erased by | An electrical signal, byte by byte, in circuit |
| Nibble and byte | 1 nibble = 4 bits; 1 byte = 8 bits |
| Step between units | 1,024, that is 2 raised to the power 10 |
| CD capacity | 700 MB |
| DVD capacity | 4.7 GB, single-sided single-layer |
| Blu-ray capacity | 25 GB per layer |
| 3.5-inch floppy disk | 1.44 MB |
| Sequential access device | Magnetic tape |
| Virtual memory area on disk | Swap space, also called the page file |
| Flash memory is a form of | EEPROM, erased in blocks |
Practice MCQs on this topic
Which of the following is the fastest memory in a computer system?
- A.Cache memory
- B.Register
- C.Main memory
- D.Hard disk
Show answer
A register is built into the CPU itself and holds the word the arithmetic and logic unit is operating on at that instant, so it is read and written in a single clock cycle.
Read the full explanation →How many bits make one nibble?
- A.2 bits
- B.4 bits
- C.8 bits
- D.16 bits
Show answer
A nibble is half a byte, that is four binary digits, and it matters because one nibble is written as exactly one hexadecimal digit, from 0 to F. That is why memory addresses in hexadecimal are read four bits at a time.
Read the full explanation →Which type of memory has to be refreshed thousands of times per second to retain its contents?
- A.SRAM
- B.DRAM
- C.ROM
- D.Flash memory
Show answer
Dynamic RAM stores each bit as a charge on a very small capacitor, and that charge leaks away in a few milliseconds, so the memory controller has to read and rewrite every cell continuously.
Read the full explanation →The contents of an EPROM chip are erased by exposing it to
- A.An electrical signal
- B.Ultraviolet light
- C.A magnetic field
- D.Infrared radiation
Show answer
An Erasable Programmable Read Only Memory chip carries a small quartz window over the silicon; ultraviolet light shone through that window releases the trapped charge from every cell at once and returns the chip to its blank state, after which it can be programmed again.
Read the full explanation →One terabyte is equal to how many gigabytes?
- A.100 GB
- B.512 GB
- C.1,024 GB
- D.2,048 GB
Show answer
Every step in the ladder of storage units multiplies by 1,024, because 1,024 is 2 raised to the power 10 and memory is addressed in binary.
Read the full explanation →Which of the following is an example of volatile memory?
- A.ROM
- B.RAM
- C.Hard disk
- D.Pen drive
Show answer
Random Access Memory holds a bit only while it is powered, whether the cell is a flip-flop in static RAM or a leaking capacitor in dynamic RAM.
Read the full explanation →What is the storage capacity of a standard single-sided, single-layer DVD?
- A.700 MB
- B.1.44 MB
- C.4.7 GB
- D.25 GB
Show answer
A Digital Versatile Disc uses a shorter wavelength laser and finer pits than a compact disc, so one side with one recording layer holds about 4.7 GB; a double-layer disc of the same size holds roughly 8.5 GB.
Read the full explanation →Cache memory is placed between which two units of a computer?
- A.The CPU and the main memory
- B.The main memory and the hard disk
- C.The keyboard and the CPU
- D.The CPU and the printer
Show answer
Cache is a small block of static RAM that keeps the instructions and data most recently used by the processor.
Read the full explanation →Which technique allows a computer to run programs larger than its physical RAM by using part of the hard disk as memory?
- A.Caching
- B.Virtual memory
- C.Spooling
- D.Defragmentation
Show answer
The operating system reserves an area of the hard disk, called the swap space or the page file, and moves pages a program is not actively using out to it.
Read the full explanation →A solid state drive stores data using
- A.Magnetic platters that rotate
- B.Flash memory chips
- C.Pits read by a laser
- D.Magnetic tape wound on reels
Show answer
An SSD is built from flash memory, itself a block-erasable form of EEPROM, which traps charge in floating-gate cells.
Read the full explanation →The storage capacity of a standard 3.5-inch floppy disk is
- A.720 KB
- B.1.44 MB
- C.2.88 MB
- D.10 MB
Show answer
The 3.5-inch high-density floppy disk, the square plastic diskette with a metal shutter, was formatted to 1.44 MB, and that figure is still asked in computer awareness papers because it anchors the small end of the capacity ladder.
Read the full explanation →Which memory is non-volatile and can be erased and rewritten electrically, byte by byte, without removing the chip from the circuit?
- A.EPROM
- B.EEPROM
- C.PROM
- D.SRAM
Show answer
Electrically Erasable Programmable Read Only Memory is erased by applying a voltage, one byte at a time, while the chip stays soldered in place, which is why it is used for settings that must survive a power cut and yet be changed occasionally, such as the configuration data of a…
Read the full explanation →Frequently Asked Questions
Which is the fastest memory in a computer?
The register, because it lies inside the CPU itself and is read in a single clock cycle. If registers are not offered as an option, cache memory is the fastest of the remaining choices, then main memory, then secondary storage such as a hard disk, and last of all magnetic tape. Speed falls at every step away from the processor while capacity rises.
What is the difference between primary and secondary memory?
Primary memory, the RAM and ROM on the motherboard, can be addressed by the processor directly and is measured in gigabytes; the RAM part of it is volatile. Secondary storage, such as a hard disk, an SSD or a pen drive, holds data permanently and is far larger, but the processor cannot work on it directly, so its contents must first be loaded into RAM.
Why is RAM called volatile memory?
Because RAM holds a bit only as long as it is powered: a static RAM cell needs current to keep its flip-flop set, and a dynamic RAM cell needs a refresh signal to top up a leaking capacitor. The moment the supply is cut both lose their contents, which is why unsaved work disappears in a power failure while files on the disk survive.
How much is 1 GB in megabytes and 1 TB in gigabytes?
One gigabyte is 1,024 megabytes and one terabyte is 1,024 gigabytes, because every step in the ladder of storage units multiplies by 1,024, which is 2 raised to the power 10. The full order is bit, nibble of 4 bits, byte of 8 bits, kilobyte, megabyte, gigabyte, terabyte, petabyte, exabyte, zettabyte and yottabyte.
What is virtual memory?
Virtual memory is a reserved area of the hard disk, called the swap space or page file, that the operating system uses as an extension of RAM. Pages that a program is not actively using are moved out to it, so software needing more space than the physical RAM can still run. Because a disk is far slower than RAM, heavy use of virtual memory slows the machine down.
Is a solid state drive a primary or a secondary storage device?
It is secondary storage. An SSD is non-volatile, keeps files after the power goes off and cannot be addressed directly by the processor. It differs from a hard disk only in technology: an SSD stores charge in flash memory cells with no moving parts, so it is faster, silent and shock-resistant, while a hard disk writes magnetically on spinning platters.
Sources
- Computer Science, Class XI, Chapter on Computer Systems and Memory — NCERT
- Informatics Practices, Class XI, Chapter on Computer System — NCERT
- Course on Computer Concepts syllabus, Memory and Storage Devices — NIELIT, Ministry of Electronics and Information Technology





