0

Reading up on wiki on bitmap as a method hard drives use to find out sectors that are available to store data to or not.

Examples are given showing the size of a bit map. with hard drive size and number of sectors.

I'm failing on where these answers are coming from.

One example from the wiki is

For explanatory purposes, we will use a 4 GiB hard drive with 4096 byte sectors, and assume the bitmap itself is stored elsewhere. The example disk would require 1,048,576 bits, one for each sector, or 128 KiB.

Can someone explain how this solution is achieved, and if possible add a small explanation regarding why,

THanks

0

1 Answer 1

0

The disk contains 4 GiB, with 4096 bytes/sector. Divide 4G by 4K, you get 1M sectors. Each of these requires a bit in the bitmap. Divide this by 8 bits/byte, you get 128 KB.

6
  • Just to make sure I understand, you divided the hard drive size by the sector size in kilobytes?
    – lecardo
    Jan 9, 2015 at 0:00
  • No, I divided the hard drive size by the sector size in bytes. 4096 is the same as 4K.
    – Barmar
    Jan 9, 2015 at 0:01
  • 4x10^9 / 4x10^3 = 1,000,000 then divide that by 8 to give 125000 bits?
    – lecardo
    Jan 9, 2015 at 0:03
  • Except that some of these are actually measured using powers of 2, not powers of 10. Hard drive manufacturers traditionally use powers of 10, but most other numbers on computers are reported in powers of 2. forums.highdefdigest.com/high-def-disc-faqs/…
    – Barmar
    Jan 9, 2015 at 0:07
  • ah so im kind of right apart from the masurement power
    – lecardo
    Jan 9, 2015 at 0:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .