2,147,483,647 bytes


log in or register to remove this ad




I always embarass myself when I do math in public, but anyway....

2,147,483,647 bytes is roughly 2.1 billion characters. According to one website I found (not linked because it seems to be rather political) there are 6.3 billion people in the world in 2004. That's as if one third of the population of the entire world had typed a single character on EN World.

2,147,483,647 bytes is roughly 2 gigabytes. That's a *lot* of conversation. Even if we're losing 20% to overhead stuff like message headers and indexes, that's still about 1.5 gigabytes of text. (And I know nothing about databases, so the 20% was just a number I grabbed because it's nice and round.)

Since a byte equals a character, assuming 7 bytes per word (to allow for spaces, punctuation, VB code, and the like), that's almost 307 million words (not accounting for database overhead).

Anyone know what 307 million words is equivalent to in printed terms? I'm certain it's way more than a paperback novel, and probably more than the collected works of Shakespeare, but is it closer to a set of encylopedias, the legal code for a small metropolis, the entire fiction section at the Library of Congress, or even more than that?
 


That is, exactly, the maximum value for a 32-bit signed integer. The maximum value for an unsigned integer is, in binary:

11111111111111111111111111111111

As you can se there are 32 ones, or "bits", above. Signed integers however, demands exactly one bit for the "sign", that is, if the value is negative or not. Remove 1 to get the maximum value:

1111111111111111111111111111111

In decimal this is 2^31-1, or exactly 2,147,483,647.

So, the database is probably even larger.

Edit: Note to self: Do not convert ANYTHING to another base before breakfast. :cool:
 
Last edited:



Psionicist said:
So, the database is probably even larger.

Well, it depends. With some systems, with a larger database, the size would become negative!

It's something I discovered when hacking saved games. Always type FF 7F in the hex file, because with FF FF you get -1. 7FFF is 32767, but add one to get 8000, and you have -32767.

(Yep, 7FFF is written FF 7F on PCs. Byte pairs are put in reverse order. Why? Because it wouldn't be confusing enough otherwise.)
 

Remove ads

Top