Maths encyclopedia and lessons  
Search

Mathematics Encyclopedia and Lessons

 
     
 

Lessons

Popular
Subjects

algebra
arithmetic
calculus
equations
geometry
differential equations
trigonometry
number theory
probability theory
more
 

References

applied mathematics
mathematical games
mathematicians
more
 
 

Offset

This article describes the computer science term. See offsets for material on the word offset as relating to the propagation of plants.

In computer science, an offset within an array or other data structure object is an integer indicating the distance (displacement) from the beginning of the object up until a given element or point, presumably within the same object. The concept of a distance is only valid if all elements of the object are the same size (typically given in bytes or words).

In computer engineering and low-level programming (such as assembly language), an offset usually denotes the number of address locations added to a base address in order to get to a specific absolute address. In this meaning of offset, only the basic address unit, usually the 8-bit byte, is used to specify the offset's size.

Examples

  • Given an array of characters, A, containing abcdef, one can say that the element containing the letter 'c' has an offset of 2 from the start of A.
01-04-2007 01:18:14
The contents of this article are licensed from Wikipedia.org
under the GNU Free Documentation License. How to see transparent copy