A computer with 32-bit integers can represent the signed integers from −2,147,483,648 to +2,147,483,647 (using a two’s-complement representation) and the unsigned integers from zero to 4,294,967,295. These ranges are large enough for many — perhaps most — applications, but some applications need larger ranges. Integers represent every integral value in a relatively compact range. Floating-point numbers represent relatively few values in a huge range. Floating-point numbers can be used when approximations to the exact values are acceptable, such as in many scientific applications, but floating-point numbers cannot be used when all of the integer values in a large range are required.

This chapter describes ...

Start Free Trial

No credit card required