28 November 2007

java.util.UUID FAQ




Recently I had a need for a universally unique identifier (UUID) and I stumbled upon this wonderful java.util.UUID mini-FAQ. If you have to use the java.util.UUID at all, you should give this little FAQ a quick read because it's got some great info to save you time in your own digging.

For example, there are 122 significant bits in a version 4 UUID (a pseudo randomly generated number) - that's 2^122 ( 5,316,911,983,139,663,491,615,228,241,121,378,304) or:

five undicillion,
three hundred sixteen decillion,
nine hundred eleven nonillion,
nine hundred eighty-three octillion,
one hundred thirty-nine septillion,
six hundred sixty-three sextillion,
four hundred ninety-one quintillion,
six hundred fifteen quadrillion,
two hundred twenty-eight trillion,
two hundred fourty-one billion,
one hundred twenty-one million,
three hundred seventy-eight thousand,
three hundred four

Man I hope that's correct - that's a damn big number!

4 comments:

  1. Great Man, how did u calculate such a big number ?? --Murali

    ReplyDelete
  2. UUID version 4 support 122 significant bits, so I used GNU bc on the command line to calculate 2^122. Then I found something that shows the names of very large numbers and figured it out.

    ReplyDelete
  3. Nice post. I am sure we will all be saying numbers like this soon if the national debt and spending is not brought under control =)

    ReplyDelete
  4. Cool - More than a Googol! I think that is larger than the number of stars and atoms in the universe combined!

    ReplyDelete