5

I am learning about FAT file system and how to calculate FAT size. Now, I have this question:

Consider a disk size is 32 MB and the block size is 1 KB. Calculate the size of FAT16.

Now, I know that to calculate it, we would multiply the number of bits per entry with the number of blocks. So first step would be to calculate the number of blocks = (32MB)/(1KB) = 2^15 = 32 KB blocks.

Then, we would put that into the first equation to get = 2^16 * 2^15 = 2^19 Now, up to here I understand and I had thought that that is the answer (and that is how I found it to be calculated in http://pcnineoneone.com/howto/fat1.html).

However, the answer I was given goes one step further to divide 2^19 by (8*1024) , which would basically give an answer of 64KB. Why is that? I have searched for hours, but could find nothing.

Can someone explain why we would perform the extra step of dividing 2^19 by (8*1024)? oh, and the other question stated that the block size is 2KB and so it divided the end result by(8*1024*1024) ... where is the 8 and 1024 coming from? please help

Music Monkey
  • 340
  • 4
  • 15
Favn Hghksd
  • 321
  • 6
  • 14
  • 1
    of course it is, but it's not "how do i figure out x" it's "i thought it should have been x, but was y. why" – Darren Kopp May 10 '12 at 16:10
  • 1
    yes it is, and I have the answer, I am trying to understand it so that if it appears again I can apply it correctly. – Favn Hghksd May 10 '12 at 16:14
  • That would depend on cluster size. Is the cluster equivalent to the block in this example? I'm assuming that block == sector as well. – Joel Cornett Jun 27 '13 at 21:56
  • I don't understand why someone would ask a great question as this, and people who won't help would say not so nice things. This question is very genuine. I came across something very similar while studying [operating systems] and have been trying to solve it and looking for answers for some hours now. – nikk Jan 05 '16 at 19:30

1 Answers1

1

you are using FAT16. Clusters are represented with 16 bits which means 16/8=2 bytes. To get size in bytes the result should be divided by 8.to get result in kilobytes you should divide your result by 8*1024

hit
  • 26
  • 1