Information Technology · Ch 1 — Introduction to Computer System
The Memory Unit
The Memory Unit
The memory unit is the part of the computer that stores data, instructions, and results. Without memory the CPU would have nowhere to keep the program it is running or the data it is working on. Computer memory is broadly divided into primary (main) memory and secondary (auxiliary) storage.
A. Primary (main) memory. Primary memory is directly connected to the CPU and holds the data and instructions that the CPU needs right now. It is fast but relatively small and, in the case of RAM, temporary. Primary memory has two main types — RAM and ROM.
RAM — Random Access Memory. RAM is the computer's working memory. When you open a program or a file, it is loaded from storage into RAM so that the CPU can use it quickly.
- RAM is volatile — its contents are lost the moment the power is switched off. This is why unsaved work disappears in a power cut.
- RAM is read/write memory — the CPU can both read from it and write to it.
- The more RAM a computer has, the more programs and data it can hold at once, and the smoother it runs.
ROM — Read Only Memory. ROM holds instructions that the computer needs permanently, especially the start-up instructions that run the moment the computer is switched on (the BIOS/boot program).
- ROM is non-volatile — its contents are not lost when the power is switched off.
- ROM is normally read-only — the CPU can read from it but cannot ordinarily change its contents.
- The instructions in ROM are usually written by the manufacturer.
| Basis | RAM | ROM |
|---|---|---|
| Full form | Random Access Memory | Read Only Memory |
| Volatility | Volatile (lost on power-off) | Non-volatile (retained) |
| Read/Write | Can be read AND written | Normally read-only |
| Purpose | Temporary working memory | Permanent start-up instructions |
| Contents set by | The user/programs at run time | The manufacturer |
B. Secondary (auxiliary) storage. Secondary storage keeps data and programs permanently, even when the power is off. It is much larger and cheaper per unit than primary memory, but slower. It is where files are saved for the long term. Common examples include the hard disk drive (HDD), the solid-state drive (SSD), the compact disc (CD) and digital versatile disc (DVD), and the USB pen/flash drive and memory cards.
Units of memory measurement. Memory and storage are measured in bytes. The smallest unit is the bit (a single 0 or 1); a group of 8 bits makes 1 byte, and one byte stores one character. Larger units go up in steps of about 1,024 (2 raised to the power 10):
| Unit | Symbol | Approximate size |
|---|---|---|
| Bit | b | A single 0 or 1 |