• BilboBargains@lemmy.world
    link
    fedilink
    English
    arrow-up
    24
    arrow-down
    1
    ·
    1 day ago

    I remember being puzzled by this and many other numbers that kept cropping up. 32, 64, 128, 256, 1024, 2048… Why do programmers and electronic engineers hate round numbers? The other set of numbers that was mysterious was timber and sheet materials. They cut them to 1220 x 2440mm and thicknesses of 18 and 25mm. Are programmers and the timber merchants part of some diabolical conspiracy?

    • Worx@lemmynsfw.com
      link
      fedilink
      English
      arrow-up
      17
      arrow-down
      1
      ·
      1 day ago

      32, 64, 128 etc. are all round numbers, counting in binary. They are powers of two. Since computers work in binary, they make logical sense.

      1220mm is 4ft, and 18 and 25mm are three-quarters of an inch, and an inch respectively.

      • Scubus@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        13
        ·
        1 day ago

        They were making a joke. That being said, im not familiar with lumber or imperial<->metric conversions so their second point was lost on me, so thanks.

      • jj4211@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        17 hours ago

        Pretty much this…

        Once upon a time, sure, you might have used an 8 bit char to store an array index and incur a 256 limit for actual reasons…

        But nowadays, you do it because 256 is a “cool techy limit”. Developers are almost all dealing with at least 32 bit values, and the actual constraints driving smaller values generally have nothing to do with some power of two limitation.