Computer Memory for UPSC ISS is the heaviest article in this hardware module, and the third heaviest in the whole series.
Quick answer. Memory has produced 23 questions in the last ten papers, an average of 2.3 a year, or about 5.75 marks. That is nearly twice what the CPU and peripherals produce individually. Only internet and security, at 30 questions, and operating systems, at 28, sit above it. If you read only one article in this module, read this one.
Statistics Paper I, Section IV. Syllabus items: memory unit, and Memory, RAM, ROM, unit of computer memory such as bits and bytes. The syllabus names this topic twice, which is more than it names anything else in the Computer section.
Why this article is longer than the others
Three of these 23 questions are calculations, and almost no ISS resource covers them. Address lines, data lines, disk capacity. A candidate who has never worked one out cannot do it in the hall, because there is no partial credit and no time to derive the method from scratch.
The rest are definitions, and they are unusually specific. Not “what is ROM”, but which type of ROM can be written only once. Not “what is memory”, but which memory is content addressable.
This is the article to do with a pen in your hand.
The memory hierarchy
One rule governs the whole structure. The closer to the CPU, the faster, the smaller and the more expensive.
| Level | Example | Speed | Size | Volatile? |
|---|---|---|---|---|
| 1. Registers | Program counter, accumulator | Fastest | Bytes | Yes |
| 2. Cache | L1, L2, L3 | Very fast | KB to MB | Yes |
| 3. Main memory | RAM, ROM | Fast | GB | RAM yes, ROM no |
| 4. Secondary storage | HDD, SSD, optical disk | Slow | GB to TB | No |
Internal memory means registers, cache and main memory, the parts the CPU works with directly. Auxiliary or secondary memory means everything else. Optical disks are secondary, never internal, and that has been asked.
The CPU always checks cache first. Found there is a cache hit, not found is a cache miss, and then it goes to RAM.
RAM and ROM
| RAM | ROM | |
|---|---|---|
| Full form | Random Access Memory | Read Only Memory |
| Volatile | Yes, contents lost on power off | No, contents survive power off |
| Writable | Yes, freely | Not freely, depends on the type |
| Holds | Programs currently running | Boot instructions, firmware |
Programs stored in ROM cannot be erased in normal use. That is the answer to a question asked in exactly those words.
The two kinds of RAM
| SRAM | DRAM | |
|---|---|---|
| Built from | Flip flops | Capacitors |
| Needs refreshing | No | Yes, constantly |
| Speed | Faster | Slower |
| Cost | Expensive | Cheap |
| Used as | Cache memory | Main memory |
| Volatile | Yes | Yes |
Both SRAM and DRAM are volatile. A question listing DRAM, SRAM and EPROM and asking which are non volatile has only one correct answer, and it is EPROM alone.
The ROM family
This table has produced two questions and the old series did not have it.
| Type | Full form | Written | Erased by |
|---|---|---|---|
| ROM | Read Only Memory | At manufacture | Never |
| PROM | Programmable ROM | Once, by the user | Never |
| EPROM | Erasable PROM | Many times | Ultraviolet light |
| EEPROM | Electrically Erasable PROM | Many times | Electrical signal |
PROM is the one that can be written only once. That is the whole question.
A flip flop
A flip flop is a sequential electronic circuit that stores exactly one bit of information. Flip flops are what SRAM and registers are built from. It appears as a standalone definition question.
The units of memory
The syllabus names this specifically: unit of computer memory such as bits and bytes.
| Unit | Equals |
|---|---|
| 1 nibble | 4 bits |
| 1 byte | 8 bits |
| 1 kilobyte, KB | 1024 bytes, 2¹⁰ |
| 1 megabyte, MB | 1024 KB, 2²⁰ bytes |
| 1 gigabyte, GB | 1024 MB, 2³⁰ bytes, 1,073,741,824 bytes |
| 1 terabyte, TB | 1024 GB, 2⁴⁰ bytes |
Memory is counted in powers of 2, not powers of 10. One GB is 1024 MB, not 1000 MB.
Worked Example 1: Address lines
This is the most important calculation in the Computer section.
Rule. To address N distinct memory locations you need n address lines, where 2ⁿ = N. Put simply, n is log base 2 of N.
A system has 1024 memory locations and each location stores 8 bits. How many address lines are needed?
| Step | Working |
|---|---|
| 1. What are we counting? | Locations, which is 1024. The 8 bits are a distraction |
| 2. Find n such that 2ⁿ = 1024 | 2¹⁰ = 1024 |
| 3. Answer | 10 address lines |
The eight bits per location is deliberate misdirection. Address lines depend only on how many locations exist, never on how big each one is. The word size decides data lines, which is the next example.
Keep this small table in your head:
| Locations | Address lines |
|---|---|
| 256 | 8 |
| 512 | 9 |
| 1024 | 10 |
| 2048 | 11 |
| 4096 | 12 |
Worked Example 2: Data lines
Rule. The number of data lines equals the word size, meaning the number of bits stored in one location. It has nothing to do with how many locations there are, and nothing to do with how many chips there are.
A memory chip has 2048 locations and each location holds 8 bits. How many address lines and data lines are needed?
| Quantity | Working | Answer |
|---|---|---|
| Address lines | 2¹¹ = 2048 | 11 |
| Data lines | Bits per location | 8 |
Now the twist the paper adds. If four such chips are placed side by side to widen the word, the data lines add up. If they are stacked to add more locations, the address lines grow instead and the data lines stay the same.
Two numbers, two independent questions. Address lines answer “how many boxes”. Data lines answer “how wide is each box”. Mixing them is the only way to get this wrong.
Worked Example 3: Disk capacity
Rule. Multiply every layer of the disk together.
Capacity = surfaces × tracks per surface × sectors per track × bytes per sector
A disc storage has 16 data recording surfaces, 256 tracks per surface, 16 sectors per track and 512 bytes per sector. What is the total capacity?
| Step | Working | Running total |
|---|---|---|
| 1. Surfaces × tracks | 16 × 256 | 4,096 tracks in total |
| 2. × sectors per track | 4,096 × 16 | 65,536 sectors |
| 3. × bytes per sector | 65,536 × 512 | 33,554,432 bytes |
| 4. Convert to KB | ÷ 1024 | 32,768 KB |
| 5. Convert to MB | ÷ 1024 | 32 MB |
Answer: 32 MB
Work in powers of 2 and it collapses. 16 is 2⁴, 256 is 2⁸, 16 is 2⁴ and 512 is 2⁹. Adding the exponents gives 2²⁵ bytes. Since 1 MB is 2²⁰ bytes, the answer is 2⁵, which is 32 MB. Done in one line with no long multiplication.
Cache memory
Cache sits between the CPU and RAM to hide the speed difference between them.
| Point | Fact |
|---|---|
| Purpose | Bridge the speed gap between CPU and main memory |
| Size relative to RAM | Always much smaller, never larger |
| Speed relative to RAM | Faster |
| Cost per byte | Higher than RAM |
| Checked first by the CPU | Yes, always |
| Secondary cache sits on | The motherboard |
| Transfers data between | The CPU and the main memory |
The size statement is a standing trap. A 2023 question stated that cache is always kept larger than RAM. It is the opposite. Cache is small precisely because it is expensive, and small is what makes it fast.
Associative memory
Associative memory, also called content addressable memory, is searched by content rather than by address. You hand it a value and it tells you where that value is, instead of you handing it an address and it returning the value.
Two separate questions have asked this, in 2019 and 2022, using the two different names. They are the same thing.
Virtual memory
When physical RAM runs out, the operating system borrows space from secondary storage and pretends it is memory.
| Point | Fact |
|---|---|
| What it provides | A large addressable space regardless of actual RAM size |
| How | Moves data between RAM and disk as needed |
| Cost | Slower, because disk access is slower than RAM |
| Managed by | The operating system, not the hardware |
Paging divides memory into fixed size blocks. Segmentation divides it into variable size blocks based on the logical structure of the program.
A terminology point worth getting right. In paging, logical memory is divided into pages and physical memory into frames. Many notes call both of them pages. The scheduling and page fault side of this is covered in Operating Systems for UPSC ISS.
Secondary storage
| HDD | SSD | Optical disk | |
|---|---|---|---|
| Stores using | Magnetism on spinning platters | Flash memory cells | Laser light on a reflective layer |
| Moving parts | Yes | No | Yes, a spinning disc |
| Speed | Slow | Fast | Slowest |
| Cost per GB | Low | High | Very low |
The medium used in optical storage for reading and recording is laser light. Not ultraviolet, not infrared. That was asked in 2026.
SSD advantages, and the one that is not
| Claimed advantage | True? |
|---|---|
| Better performance | Yes |
| Low power and heat | Yes |
| High reliability | Yes |
| Low price | No. SSDs cost more per gigabyte |
That exact four item list appeared in 2025, with low price sitting in it as the trap.
Flash memory
Flash memory is non volatile, fast to read and relatively slow to write, and it is removable and portable. It is what powers pen drives, memory cards, SSDs, mobile phones, digital cameras and music players, and that list has been asked directly.
BIOS
The Basic Input Output System is firmware stored in ROM. Three functions, all three asked together in 2024.
- It performs the power on self test, checking that the hardware is working
- It boots the computer system
- It provides hardware independent access to physical devices for the operating system
How This Gets Asked
The calculation nobody practises [2018]
A system consists of 1024 memory locations and each location can store 8 bits. How many number of address lines are required to address?
Ten. Because 2¹⁰ is 1024.
The eight bits are there to make you hesitate. Address lines count locations, nothing else. A candidate who has done Worked Example 1 answers this in five seconds. A candidate who has not will sit and try to reason it out and lose ninety seconds whichever answer they pick.
The same memory, two names [2019 and 2022]
Which one of the following is content based addressable memory? [2019]
Which one of the following refers to associative memory? [2022]
Associative memory and content addressable memory are the same thing, asked three years apart under its two names.
If you memorised one label and not the other, you scored one out of two on a topic you actually knew.
The non volatile question [2022]
Which of the following is or are non volatile? 1. DRAM 2. SRAM 3. EPROM
Only EPROM. Both DRAM and SRAM are volatile, and SRAM being faster and more expensive does not make it permanent.
Candidates associate SRAM with cache, cache with speed, and speed with importance, and then guess that it must survive a power cut. It does not.
Quick Revision Table
| Point | Value |
|---|---|
| Hierarchy, fastest first | Registers, cache, main memory, secondary storage |
| Internal memory | Registers, cache, ROM and RAM |
| Auxiliary memory | Secondary storage |
| Optical disks are | Secondary, never internal |
| CPU checks first | Cache |
| RAM | Volatile |
| ROM | Non volatile |
| SRAM and DRAM | Both volatile |
| SRAM built from | Flip flops, used as cache |
| DRAM | Needs refreshing, used as main memory |
| Written only once | PROM |
| Erased by ultraviolet light | EPROM |
| Erased electrically | EEPROM |
| Flip flop stores | 1 bit |
| 1 byte | 8 bits |
| 1 GB | 1024 MB, 2³⁰ bytes |
| Address lines for N locations | n where 2ⁿ = N |
| Data lines | Equal to the word size |
| Disk capacity | Surfaces × tracks × sectors × bytes per sector |
| Cache size against RAM | Always smaller |
| Secondary cache sits on | The motherboard |
| Content addressable memory | Associative memory |
| Optical storage medium | Laser light |
| SSD disadvantage | Higher price per gigabyte |
| Flash memory | Non volatile, used in phones, cameras, music players |
| BIOS does | Power on self test, boot, hardware independent access |
Practice Set
Ten questions. No answer key below.
Write your answers in the comments, all ten in a single comment, in the format 1-b 2-a 3-d and so on. The full answer key is posted in this same thread after seven days.
A year in brackets means the question is from that paper.
- Which one of the following hardware components is normally used to accommodate the secondary cache? [2017]
- Which type of memory is the auxiliary memory? [2018]
- A disc storage has 16 data recording surfaces. Number of tracks per surface is 256 and number of sectors per track is 16. Bytes per sector are 512. What is the total capacity? [2018]
- Which type of memory is suitable for mobile phones, digital cameras and iPods? [2019]
- One Giga Byte (GB) memory is equal to [2020]
- A sequential electronic circuit that is used to store 1 bit of information is called [2020]
- Consider the following types of memory in computer systems: 1. Cache memory 2. ROM 3. Optical disks 4. Registers Which of the above are types of internal process memory? [2021]
- On which type of ROM can data be written only once? [2022]
- Consider the following statements regarding cache memory: 1. The size of cache memory is always kept higher than the size of RAM. 2. The CPU refers to cache memory before referring to main memory. Which of the statements given above is or are correct? [2023]
- What is the medium used in optical storage systems for reading and recording data? [2026]
Question 3 is the one to time yourself on. If it takes more than ninety seconds, go back to Worked Example 3 and do it again using powers of 2.
Frequently Asked Questions
How many questions come from computer memory in UPSC ISS?
Twenty three across the ten papers from 2017 to 2026, about 2.3 a year, worth roughly 5.75 marks. It is the heaviest single topic in the Computer section.
How do I calculate the number of address lines?
Find n such that 2 raised to n equals the number of memory locations. For 1024 locations the answer is 10. The number of bits stored in each location does not affect address lines at all.
Are SRAM and DRAM volatile?
Both are volatile. SRAM is faster and is used for cache, DRAM is cheaper and is used for main memory, but neither retains data when the power is switched off.
Which type of ROM can be written only once?
PROM, or Programmable Read Only Memory. EPROM can be erased with ultraviolet light and EEPROM electrically, so both of those can be written many times.
What is associative memory?
Memory that is searched by content rather than by address. It is also called content addressable memory, and the paper has used both names in different years.
Is cache memory larger than RAM?
No. Cache is always much smaller than RAM. It is expensive per byte, and its small size is part of why it is fast. A past question stated the opposite as a trap.
What is the medium used in optical storage?
Laser light. Ultraviolet light erases EPROM chips, which is a different technology and a common distractor in the options.
Is virtual memory a type of hardware?
No. Virtual memory is a technique managed by the operating system that uses secondary storage to extend the addressable space beyond the physical RAM available.
Related Reading
- Computer Application for UPSC ISS: Complete 16 Part Series
- CPU for UPSC ISS
- Input and Output Devices for UPSC ISS
- Operating Systems for UPSC ISS
Part 4 of 16 in the Computer Series for UPSC ISS. Previous: CPU for UPSC ISS. Next: Input and Output Devices for UPSC ISS, published 9 October at 8:00 AM.