ABSTRACT

This chapter considers how large numbers are represented and manipulated in computers whose hardware performs arithmetic only on relatively small, finite precision integers. It explains a framework to place the basic arithmetic operation on a sounder footing and produce an algorithm suitable for implementation with big numbers. The hardware on which a computer algebra system is implemented provides the facilities to store and manipulate integers of finite precision. The chapter discusses the four basic arithmetic operations: addition, subtraction, multiplication, and division. Most computers have special machine instructions to perform each of these operations efficiently in hardware. Testing for odd/even requires only the examination of the rightmost bit of a number, and halving corresponds to shifting a binary number one bit to the right. Rational arithmetic is pervasive in computer algebra systems, and so it is extremely important to implement the basic arithmetic operations on fractions as efficiently as possible.