community
directory
books
authors
images
encyclopedia

Email:
Password:
Register

Knowledgerush Search

 

Google
  Web knowledgerush


Search for images of Zero-based


Message boards   Post comment

Zero-based

The zeroth item is the initial item of a sequence, if that sequence is numbered beginning from zero rather than one. This kind of numbering is common in computer systems, and so hackers and computer scientists often use zeroth where others might use first, and so forth.

In computer science, zero is the smallest natural number, and the base case for many kinds of numerical recursion. Thus, proofs and other sorts of mathematical reasoning in computer science often begin with zero. Zero is also the lowest unsigned integer value, one of the most fundamental types in programming and hardware design. For these reasons, CS scholars are accustomed to count from zero rather than one.

This preference is embedded in many influential programming languages, including C and Lisp. In both, sequence types (C arrays and Lisp lists and vectors) are indexed beginning with the zero subscript. Particularly in C, where arrays are closely tied to pointer arithmetic, this makes for a simpler implementation. Other languages have adopted one-based arrays for a closer correspondence to the usual ordinal numbers.

Hackers and computer scientists often like to call the first chapter of a publication "Chapter 0", especially if it is of an introductory nature. One of the classic instances was in the First Edition of K&R. In recent years this trait has also been observed among many pure mathematicians, who have an independent tradition of numbering from 0.

Zero-based numbering tends to reduce fencepost errors, though it cannot eliminate them entirely.

A common use of zeroth outside computing is in the name of the Zeroth Law of Thermodynamics, a law that was formulated after the first, second and third laws.

In the realm of fiction, Isaac Asimov eventually added a 'Zeroth Law' to his famous Three Laws of Robotics.


Article based on zeroth at FOLDOC, used with permission.

 

Compose Your Message

Your Email Address or Pen Name (optional):
Subject:
Your Message:
 

 

 

 

 

 

This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Zero-based".

 

Contact UsPrivacy Statement & Terms of Use

 
Copyright © 1999-2003 Knowledgerush.com. All rights reserved.