Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Index notation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==In computing== In several programming languages, index notation is a way of addressing elements of an array. This method is used since it is closest to how it is implemented in [[assembly language]] whereby the address of the first element is used as a base, and a multiple (the index) of the element size is used to address inside the array. For example, if an array of integers is stored in a region of the computer's memory starting at the memory cell with address 3000 (the [[base address]]), and each integer occupies four cells (bytes), then the elements of this array are at memory locations 0x3000, 0x3004, 0x3008, β¦, 0x3000 + 4(''n'' β 1) (note the [[zero-based numbering]]). In general, the address of the ''i''th element of an array with [[base address]] ''b'' and element size ''s'' is {{nowrap|''b'' + ''is''}}.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)