Reputation
3,670
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 15 33
Newest
 Nice Answer
Impact
~304k people reached

Apr
10
revised Why do computers count from zero?
Some additional notes (clarification and links to Dijkstra's paper)
Apr
10
awarded  Popular Question
Apr
8
comment Trying to kill processes by name, but remains one..why?
This does not answer the question. The process that the OP believes it's remaining is not mysql but the grep mysql.
Apr
6
awarded  Guru
Apr
5
comment Why do computers count from zero?
@DavidSchwartz Let's take an old language as C. If allocate memory you get an address where the memory starts. If a compiler sees something like v[n] it has to compute the address of the expression. If the indexes start a 0 the computation is v+x*size. If at 1 the computation is v+(x-1)*size. E.g., v[1] will correspond to v + (1-1)*size that is v.
Apr
5
awarded  Mortarboard
Apr
5
comment Why do computers count from zero?
@DavidSchwartz The answer is not incorrect. When the first languages where developed throwing away memory was even worse than doing an additional computation at each access. I am not claiming that this is the only way to compute an address but I am claiming that this was the reason why addressing start at 0.
Apr
5
comment Why do computers count from zero?
@DavidSchwartz Of course but in this case the zeroth element will not be addressable. If your array begins at 1 you will never use the zeroth element.
Apr
5
awarded  Good Answer
Apr
5
awarded  Nice Answer
Apr
5
comment Why do computers count from zero?
@OrangeDog Ooops sorry ...
Apr
5
comment Why do computers count from zero?
@OrangeDog Of course I could: with a single byte I get 256 values, how I interpret them (0-255, 1-256, 300-555) does not matter.
Apr
5
comment Why do computers count from zero?
If you begin counting from 0 you don't reduce the number of addresses you could (in theory) go from 1 to 257.
Apr
5
comment Why do computers count from zero?
Has nothing to do with binary representation. Both binary and decimal numbers begins from 0.
Apr
5
comment Why do computers count from zero?
Has nothing to do with binary representation. Both binary and decimal numbers begins from 0 (as you show in your example).
Apr
5
answered Why do computers count from zero?
Mar
29
answered Understanding top command in unix
Mar
23
answered yum: enable a disabled repository
Mar
17
revised Is there a way to keep track of unopened/unchecked files?
edited tags
Mar
17
comment Is there a way to keep track of unopened/unchecked files?
Which system are you using?