title: How many years of millisecond timestamps can be represented by 41 bits?
body: <p>I'm looking at the <a href="http://instagram-engineering.tumblr.com/post/10853187575/sharding-ids-at-instagram" rel="noreferrer">Instagram blog post about sharded ID generation</a>. This blog post describes generating 64-bit identifiers. Their mechanism allocates 41 of the 64 bits to a millisecond timestamp, and they say:</p>
  
  <blockquote>
    <ul>
    <li>41 bits for time in milliseconds (gives us 41 years of IDs with a custom epoch)</li>
    </ul>
  </blockquote>
  
  <p>Is this a typo? I calculated that you can store 69 years of millisecond timestamps in 41 bits. Here's how:</p>
  
  <ul>
  <li>Max milliseconds stored in 41 bits: (2^41)-1 = 2199023255551 ms</li>
  <li>Divided by (1000 * 60 * 60 * 24 * 365 ) ms/year = 69 years</li>
  </ul>
  
  <p>So, where am I wrong?</p>