- Practice
- About 14 min
- 5 practice questions
Storage and speed calculations: capacity, transfer time, clock and image size
Solve the standard computer calculations: files that fit, transfer time, instructions per second from clock speed, disk capacity and uncompressed image size.
If something looks wrong, please tell us.
Computer Fundamentals has a small set of calculation types that repeat in every paper. Learn the formula for each and always convert units first. This lesson uses 1 KB = 1,024 bytes, 1 MB = 1,024 KB and 1 GB = 1,024 MB, the convention used in textbooks, and all other figures are invented for practice.
Type 1: how many files fit
Convert capacity and file size to the same unit, divide, and keep the whole number.
Worked example 1
How many 3.5 MB songs fit on a 16 GB pen drive? 16 GB = 16 x 1,024 = 16,384 MB. Songs = 16,384 / 3.5 = 4,681.14, so 4,681 whole songs. The partial song does not count.
Type 2: transfer time
Time = amount of data / speed, with both in the same unit.
Worked example 2
A 2 GB file is copied at 40 MB per second. 2 GB = 2 x 1,024 = 2,048 MB. Time = 2,048 / 40 = 51.2 seconds. If the speed doubles to 80 MB per second, the time halves to 25.6 seconds.
Type 3: clock speed and instructions
The clock ticks a certain number of times a second; 1 GHz means 1,000 million ticks per second. If each instruction takes a fixed number of ticks, then instructions per second = clock rate / ticks per instruction.
Worked example 3
A 3 GHz processor needs 4 ticks per instruction. Instructions per second = 3,000,000,000 / 4 = 750,000,000, that is 750 MIPS. For a 2 GHz processor with 2 ticks per instruction, the figure is 2,000,000,000 / 2 = 1,000,000,000, that is 1,000 MIPS.
Type 4: disk capacity
Capacity = surfaces x tracks per surface x sectors per track x bytes per sector.
Worked example 4
A disk has 2 surfaces, 512 tracks on each, 64 sectors per track and 512 bytes per sector. Capacity = 2 x 512 x 64 x 512 = 33,554,432 bytes. In MB: 33,554,432 / 1,048,576 = 32 MB.
Type 5: image size
Uncompressed size in bits = width in pixels x height in pixels x bits per pixel. Divide by 8 for bytes.
Worked example 5
An image of 1,024 by 768 pixels uses 24 bits (3 bytes) per pixel. Pixels = 1,024 x 768 = 786,432. Bytes = 786,432 x 3 = 2,359,296. In MB: 2,359,296 / 1,048,576 = 2.25 MB. This is the size before compression.
Type 6: network speed
Network speeds are in bits per second, while files are in bytes. Convert the file to bits by multiplying by 8. A 90 MB file at 30 Mbps: 90 x 8 = 720 megabits, and 720 / 30 = 24 seconds. If you wrongly divide 90 by 30 you get 3 seconds, which is eight times too small.
Common slips
- Using 1,000 where the question expects 1,024.
- Rounding up a count of files; only whole files count.
- Forgetting to convert GB to MB before dividing.
- Mixing bits and bytes when speeds are given.
Same unit first, then divide or multiply. Bits to bytes: divide by 8. Each unit up: divide by 1,024.
Key takeaways
- Files that fit = capacity / file size, in whole numbers.
- Time = data / speed.
- Instructions per second = clock rate / ticks per instruction.
- Capacity = surfaces x tracks x sectors x bytes per sector.
Check your understanding
-
1. How many 2 MB files fit on an 8 GB card (1 GB = 1,024 MB)?
- 8,192
- 4,096
- 4,000
- 16,384
Show answer
Answer: B. 8 GB = 8,192 MB. 8,192 / 2 = 4,096 files.
-
2. A 3 GB file is copied at 48 MB per second. How long does it take?
- 144 seconds
- 62.5 seconds
- 64 seconds
- 16 seconds
Show answer
Answer: C. 3 GB = 3,072 MB. 3,072 / 48 = 64 seconds.
-
3. A 2 GHz processor needs 2 ticks per instruction. How many instructions per second does it execute?
- 4,000 million
- 2,000 million
- 500 million
- 1,000 million
Show answer
Answer: D. 2,000 million ticks / 2 = 1,000 million instructions per second, that is 1,000 MIPS.
-
4. An image of 800 by 600 pixels uses 8 bits per pixel. What is its size in bytes before compression?
- 480,000
- 3,840,000
- 60,000
- 1,440,000
Show answer
Answer: A. 800 x 600 = 480,000 pixels. At 1 byte each, the size is 480,000 bytes. 3,840,000 is the size in bits.
-
5. A disk has 4 surfaces, 100 tracks each, 20 sectors per track and 512 bytes per sector. What is its capacity in bytes?
- 2,048,000
- 4,096,000
- 8,000
- 512,000
Show answer
Answer: B. 4 x 100 x 20 = 8,000 sectors. 8,000 x 512 = 4,096,000 bytes.
Sign in to keep track of the lessons you finish.