Second representation requires at least 6 bits to represent numbers between 0 to 59. But 5 bits are not just enough - 25 = 32, which can only represent from 0 up to 31 seconds.

According to K.N. King:

You may be wondering how it 's possible to store the seconds - a number between 0 and 59 in a field with only 5 bits. Well. DOS cheats: it divides the number of seconds by 2, so the seconds member is actually between 0 and 29.

That really makes no sense?

  • jdnewmil@lemmy.ca
    link
    fedilink
    arrow-up
    5
    ·
    8 hours ago

    There is an implied 6th bit that is zero. Timestamps have a two-second minimum resolution.

    • davelA
      link
      fedilink
      English
      arrow-up
      2
      ·
      7 hours ago

      That makes sense. Presumably the missing bit is the least significant one, and DOS is rounding them and storing only even-numbered seconds.