you are viewing a single comment's thread
view the rest of the comments
[–] 32 points 1 year ago (4 children)

why did they only use an 8-bit number to count billionaires , surely there are more of em

/dumbface

  • source
  • hideshow 4 child comments
  • [–] 6 points 1 year ago (3 children)

    What are you, one-based or something? If it were an 8-bit integer there would have been 255.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 6 points 1 year ago (2 children)

    it's 255 for maximum index, but still 256 for maximum count though lol but agreed, 255 would be more obvious

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 1 year ago (1 child)

    Well still 255 for maximum count if you're using an 8-bit number to COUNT billionaires like your initial comment said - but if you're using an 8-bit number to index your collection of billionaires, then yes, you could get up to 256.

    For counting we should always at least have the possibility of a 0 value, hence we count actual billionaires from 1-255. With indexing, 0 is already the first billionaire, so we get billionaires from 0-255, or a total of 256

  • source
  • parent
  • hideshow 1 child comment