Thursday, 15 January 2015

math - How many years of millisecond timestamps can be represented by 41 bits? -


I see. This blog post has a description of generating 64-bit identifiers. In their system, the timestamp of a millisecond of 64 bits is allocated to 41 bits, and they say:

  • 41 bits for a time in milliseconds (to us a custom era With 41 years of age)

Is this a typo? I have calculated that you can store timestamps of 69 beats in 41 beats in milliseconds. Maximum milliseconds stored in 41 bit: (2 ^ 41) -1 = 2199023255551 MS

  • (1000 * 60 * 60 * 24 * 365) divided by:

    • MS / year = 69 years

    So, where am I?

  • You are not wrong about calculation.

      (2 ^ 41) -1 ms == 21 9 9023255.551 s == 610839.7932086 hr == 25451.65805036 day == 69.6828 Julian year == 69.6843 Gregorian Years  

    Lines closely related to your results ( 69 years )

    However, the website you link to says that 41 beat them

    41 years old with a custom era ID

    In this context, "era" probably started date. Given that the article was published in "3 years ago", or 2012 , we can calculate that its era 2012 + 41 - 69 == 1984 / <> with code begins. This date was selected as possibly.


    No comments:

    Post a Comment