This preview shows page 1. Sign up to view the full content.
Unformatted text preview: numbers that may be either positive or negative. Floatingpoint encodings are a base-two version of scientiﬁc notation for representing real numbers. Computers implement arithmetic operations such as addition and multiplication, with these different representations similar to the corresponding operations on integers and real numbers. Computer representations use a limited number of bits to encode a number, and hence some operations can overﬂow when the results are too large to be represented. This can lead to some surprising results. For example, on most of today’s computers, computing the expression
200 * 300 * 400 * 500 21 22 CHAPTER 2. REPRESENTING AND MANIPULATING INFORMATION yields 884,901,888. This runs counter to the properties of integer arithmetic—computing the product of a set of positive numbers has yielded a negative result. On the other hand, integer computer arithmetic satisﬁes many of the familiar properties of true integer arithmetic. For example, multiplication is...
View Full Document