ENCYCLOPEDIA 4U .com



Encyclopedia Home Page

Google
  Web Encyclopedia4u.com

 

Zeroth

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.




Content on this web site is provided for informational purposes only. We accept no responsibility for any loss, injury or inconvenience sustained by any person resulting from information published on this site. We encourage you to verify any critical information with the relevant authorities.



Copyright © 2005 Par Web Solutions All Rights reserved.
| Privacy

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