- Foundation
- About 12 min
- 5 practice questions
Memory and units of data: bits, bytes, RAM and ROM
Understand how computers measure data from a bit to a terabyte, and tell RAM, ROM and cache apart.
If something looks wrong, please tell us.
A computer stores everything, whether a photo, a song or a letter, as numbers made of just two digits, 0 and 1. To talk about how much it stores, we need units. This lesson builds them step by step and then shows the types of memory that hold the data.
Bits and bytes
A bit (binary digit) is the smallest unit: a single 0 or 1. A group of 8 bits is a byte, and one byte can hold one character such as the letter 'A'.
| Unit | Symbol | Size (as used in most school and exam questions) |
|---|---|---|
| Byte | B | 8 bits |
| Kilobyte | KB | 1,024 bytes |
| Megabyte | MB | 1,024 KB |
| Gigabyte | GB | 1,024 MB |
| Terabyte | TB | 1,024 GB |
Some makers and some textbooks use 1,000 instead of 1,024 for these steps. Exam questions usually say which to use or follow 1,024; if the question gives no hint, 1,024 is the usual choice. A helpful rule: to change to a smaller unit, multiply; to change to a bigger unit, divide.
Types of memory
- RAM (Random Access Memory): the working memory. It holds the programs and data being used right now. It is fast but volatile: its contents vanish when the power goes off.
- ROM (Read Only Memory): holds permanent start-up instructions. It is non-volatile, and its contents stay when the power is off.
- Cache memory: a very small, very fast memory close to the CPU that keeps frequently used data.
- Secondary storage: hard disk, SSD, pen drive, memory card. These keep files permanently and have much bigger capacity than RAM.
Worked examples
Example 1. Convert 5 MB into KB. Changing to a smaller unit, multiply: 5 x 1,024 = 5,120 KB.
Example 2. Convert 2 GB into MB. 2 x 1,024 = 2,048 MB.
Example 3. A phone has 2 GB of free space. If each photo is 4 MB, how many photos fit? 2 GB = 2,048 MB. 2,048 / 4 = 512 photos.
Example 4. How many bits are in 64 bytes? Each byte has 8 bits, so 64 x 8 = 512 bits.
Example 5. A pen drive holds 8 GB. If each song is about 4 MB, how many songs fit? 8 GB = 8 x 1,024 = 8,192 MB, and 8,192 / 4 = 2,048 songs. The 4 MB size is only an example for practice.
Example 6. You type an essay but the power fails before you save. What is lost and why? The essay was held in RAM, which is volatile, so it vanishes. If you had saved it to the hard disk, it would have stayed.
8 bits = 1 byte. Each step up (KB, MB, GB, TB) is 1,024 times larger. RAM is lost at power off; ROM and disks are kept.
Key takeaways
- Bit < byte < KB < MB < GB < TB.
- To go to a smaller unit multiply by 1,024; to a bigger unit divide.
- RAM is temporary and fast; ROM is permanent and read-only; disks store files.
- Save your work often.
Check your understanding
-
1. How many bits make one byte?
- 4
- 8
- 16
- 1,024
Show answer
Answer: B. One byte is made of 8 bits.
-
2. Convert 3 MB into KB (using 1,024).
- 3,072
- 3,000
- 1,024
- 300
Show answer
Answer: A. 3 x 1,024 = 3,072 KB.
-
3. Which memory loses its contents when the power is switched off?
- ROM
- Hard disk
- Pen drive
- RAM
Show answer
Answer: D. RAM is volatile. The others keep their contents.
-
4. A 1 GB space holds how many 1 MB files (using 1,024)?
- 1,024
- 1,000
- 512
- 100
Show answer
Answer: A. 1 GB = 1,024 MB, so 1,024 files of 1 MB each.
-
5. The start-up instructions of a computer are kept permanently in
- RAM
- A printer
- ROM
- A mouse
Show answer
Answer: C. ROM is non-volatile and holds the start-up instructions.
Sign in to keep track of the lessons you finish.