-
Book Overview & Buying
-
Table Of Contents
Modern Computer Architecture and Organization - Third Edition
By :
Modern processors usually support integer data types in widths of 8, 16, 32, and 64 bits. Some smaller embedded processors may not directly support 64-bit or even 32-bit integers in hardware, while more sophisticated devices may provide hardware support for 128-bit integers. Integer data types are suitable for use in a wide range of applications; however, many areas of computing, particularly in fields such as science, engineering, and navigation, require the ability to represent extremely large and small numbers with high precision.
As a simple example of the limitations of integer operations, suppose you need to divide 5 by 3. On a computer limited to integer arithmetic, you can evaluate this expression using integer operations in C++, as shown here:
#include <iostream>
int main(void)
{
int a = 5;
int b = 3;
int c = a / b;
std::cout << "c = " << c << std::endl;
return 0;
}
This program produces the following...