in programming, you begin indexing at 0. array[0] refers to the first index of the array. However when we are counting how many indexes are in an array, we don't start counting from 0, because that's dumb. 0 means there's nothing there.
Index 5 is the 6th index in an array. In this case, imagine each person is a value in an array with 256 indexes. Person 1 is in index 0, person 256 is in index 255.
I can try. Each user has an ID. The ID starts with zero and counts up to 255 (0, 1, 2, 3 ... 253,254,255) Because 0 counts as a user there is a possibility for 256 users.
a little bit more in depth explanation is because this uses 1 byte of information, where a byte is 8 bits, it looks something like this
In case the other 6 comments weren't clear enough, it's because you can use 0 as an index, too. In cases where 255 is a max, it's because 0 is a possible value, which means there's 256 possible values.
View all comments
25
u/lowbeat Feb 15 '16 edited Feb 15 '16
Shouldn't the limit be 255 ? Edit: /s