Posts Tagged ‘problem’

## How many books can you store in 1 GB hard drive?

December 6, 2010
35 comments

As explained in my previous post Few rules of thumb

Let’s apply Rule #7 to this problem. As the rule says, “**A character is represented by 8 bits**” i.e. each character takes about 8 bits. Please note that this problem can be solved only by making few assumptions and your solution depends on the kind of assumptions you make.

Let’s solve the problem now:

- we know 1 byte = 8 bits (Ref. table at the end of this post)
- 1 GB (giga byte) = 1073741824 bytes (≈ 10
^{9 }bytes) [read it as, 10 power 9] - 1 GB = 8 * 10
^{9 }bits

- 1 GB (giga byte) = 1073741824 bytes (≈ 10
- Now assume on an average every word is comprised of 5 characters
- Assume every page has about 10 lines and each line has about 20 words => 200 words per page
- Number of characters in each page => 5*200 = 1000 characters per page
- Assume every book has about 300 pages => 1000*300 = 300000 characters per book
- Now that every book has about 300,000 characters. The amount of memory taken by each book is
- 300,000 * 8 = 2400000 bits (≈24*10
^{5 }bits of space) - The above principle states that each book takes about 24*10
^{5 }bits of space

- 300,000 * 8 = 2400000 bits (≈24*10
- Now, how many bookscan be stored in 1 GB hard drive?
- (8 * 10
^{9 })/ (24*10^{5}) ≈ 3333.33 books (It’s corrected now. Thanks to the comments)

- (8 * 10

Answer to the question is… In 1 GB hard drive you can store about **3334 books** with the kind of assumptions we made!

We used following conversions to solve the above problem:

- 1 Byte = 8 Bit
- 1 Kilobyte = 1024 Bytes
- 1 Megabyte = 1048576 Bytes
- 1 Gigabyte = 1073741824 Bytes