• @wewbull@feddit.uk
    link
    fedilink
    English
    155 months ago

    We can, but it’s awkward to do so. By having everything work with powers of 2 you don’t need to have everything the same size, but can still pack things in memory efficiently.

    If your registers were 48bits long, you can use it to store 6 bytes, or 3 short ints, but only one int with 16-bits going unused. If they are powers of two in size, you can always fit smaller things in them with no wasted space.

    • @asmoranomar@lemmy.world
      link
      fedilink
      English
      115 months ago

      A better example is to explain the chaos of having to go to the grocery store and pick up some hot dogs and buns. You know the pain.