1.4 - Memory: RAM & ROM
The role of memory in computers
Memory plays a vital part in how computers work by holding the data and instructions that the central processing unit (CPU) needs. Computers mainly use two types of memory: random access memory (RAM) and read only memory (ROM).
Volatile and non-volatile memory
Memory can be classified based on whether it needs power to keep data stored.
Volatile memory
Volatile memory requires a constant power supply to retain data. If the power is switched off, all stored information is lost. Power is still needed to read from or write to this type of memory while the computer is on.
Non-volatile memory
Non-volatile memory keeps data even without power, so information remains safe when the computer is turned off. Like volatile memory, it needs power to access or update the stored data.
RAM as volatile memory
RAM, which stands for random access memory, is a type of volatile memory that the CPU uses for fast reading and writing of data. When programs or files are in use, their data and instructions are loaded into RAM for quick access.
Key features of RAM
- Speed - The CPU can quickly read data from and write data to RAM, making it ideal for running programs efficiently.
- Temporary storage - When you open a program or file, its data and instructions are loaded into RAM for rapid access. This helps the computer perform tasks smoothly.
- Impact on performance - Having more RAM allows the computer to handle multiple tasks at once without slowing down. If there's not enough RAM, the system might use part of the hard drive as extra temporary storage, but this is much slower to access.
RAM usually comes in the form of sticks, which are small circuit boards with microchips. These plug into slots on the computer's motherboard to expand memory capacity.
ROM as non-volatile memory
ROM, which stands for read only memory, is a type of non-volatile memory.
Key features of ROM
- Read-only nature - Data in ROM can be read by the CPU, but it cannot be modified or overwritten during normal use.
- Boot-up instructions - ROM typically holds the basic instructions needed to start the computer, known as the boot process. When you turn on the computer, the CPU reads these instructions from ROM to set up the system properly.
- Limited size - Computers usually have only a small amount of ROM, as most non-volatile storage comes from secondary devices like hard drives or solid-state drives (SSDs).