1
$\begingroup$

Every introductory CompSci resource I can find goes through how 8 bits are in a byte, etc. So a byte can store some 2^8 values in binary. Then when asking about four bytes, we can assume this is (2^8)^4=2^32.

But I can't find anywhere if this pattern holds up until the total amount of hard drive or memory storage. For instance, if even a single megabyte can really hold (2^8)^1000000 bits, isn't this a number so large that it could store all data in existence everywhere in the universe many times over? The number of possible combinations from a number that large would surely never be reached. Yet in reality, we all know a megabyte isn't much.

I can't help but feel somewhere that the exponentiation must stop, and we instead multiply bytes together. Or is it really the case the numbers can get this big? Such as a gigabyte representing ((2^8)^1000)^3 bits?

If I can represent a number, let's say, 1 million in 32 bits, and I wanted to store 10^50 numbers this large, wouldn't the required bits be 2^32*10^50? First of all, I'd never need to store 10^50 of any unit of data on my hard drive, that's astronomically massive, and secondly, 2^32*10^50 is quite a small number, far below (2^8)^1000000. So what's really happening here that we need so much storage, and a megabyte isn't much?

$\endgroup$

1 Answer 1

3
$\begingroup$

A megabyte represents $8\cdot10^6$ bits. We can write $2^{8\cdot10^6}$ bit-strings using this much memory. But, this number is not the same as how many such bit-string we can store! Well, we can only store a single bit-string of size $8\cdot10^6$ bits in $1$ megabyte.

To understand this better: consider a single page of a document. On a single-spaced page with 12 point font, we can put around 3000 characters. The number of possible pages that can be written in English on this single page of the document would be $26^{3000}$. But, how many characters can we actually write on such a page? quite simply 3000.

$\endgroup$
3
  • $\begingroup$ I think I understand. So for instance, let's say we can represent any single character with 4 bytes, or 2^32 bits. And we want 3000 of those characters for a single page. This would take 3000 * 2^32 bits of storage, a low number. However, if we examined the number of possible permutations of 3000 such characters, this would be (2^32)^3000, a gigantic number. Is my mistake confusing the permutations (exponential) with the actual bits we need to store things (multiplicative)? How accurate is this interpretation of mine? $\endgroup$
    – user4779
    Commented Jun 16, 2020 at 15:11
  • $\begingroup$ Exactly right! You should also read about qubits! $\endgroup$
    – prime_hit
    Commented Jun 16, 2020 at 15:15
  • $\begingroup$ Great, thanks! I'll look that up too. $\endgroup$
    – user4779
    Commented Jun 16, 2020 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.