Whole Number Definition

  Technical
Whole Number Definition

A whole number is an integer that is 0 or greater. The first five whole numbers are 0, 1, 2, 3, and 4. They continue upwards to infinity.

Whole numbers are almost identical to natural numbers except they include 0. This is important in computer science since numeric ranges often begin with zero. For example, the first record in an array is 0, rather than one. 24-bit RGB color provides a range of 0 to 255 for red, green, and blue values. These values are represented by whole numbers rather than natural numbers because they include 0.

As the name implies, a whole number is not a fraction. It also cannot be negative. Since integers range from negative infinity to positive infinity, whole numbers are a subset of integers.

LEAVE A COMMENT