Hacker News new | ask | show | jobs
by lionkor 222 days ago
The first element in a collection at address 15 is at address 15. The offset of an element from the start is addr-start, so 15-15=0 for the first, 16-15=1 for the second, etc.

that's why we start from 0, not because of voltages, at least in compsci.

1 comments

This is all mostly about cuts and spans in a continuum. Cuts can be numbered starting with zero, but spans can't be. Book chapters are spans of content.