177k views
4 votes
Most hard drives are divided into sectors of 512 bytes each. Our disk has a size of 16 GB. Fill in the blank to calculate how many sectors the disk has. Note: Your result should be in the format of just a number, not a sentence.

disk_size = 16*1024*1024*1024
sector_size = 512
sector_amount =
print(sector_amount)

User MALON
by
7.5k points

1 Answer

5 votes
The answer is pretty simple to achieve for this question. Multiply the disk size and then divide by the sector size - this will result in the total number of sectors. The reason the disk size shows “16*1024*1024*1024” is because there are 1024 bytes (B) in one kilobyte (1KB), and 1024KB in one megabyte (1MB), and 1024MB in one gigabyte (1GB). So, once you find out how many total bytes you have and then divide the total number of bytes by sector size (512), you will arrive at the answer.
User SnowYetis
by
7.8k points