Arithmetic for Computers

Publisher Summary Computer words are composed of bits and thus, words can be represented as binary numbers. Although the natural numbers 0,1, 2, and so on can be represented either in decimal or binary form, the question arises regarding the way in which the other numbers that commonly occur are represented. This chapter discusses the representation of numbers, arithmetic algorithms, hardware that follows these algorithms, and the implications of all this for instruction sets. Computer arithmetic is distinguished from paper-and-pencil arithmetic by the constraints of limited precision. This limit may result in invalid operations through the calculation of numbers larger than the predefined limits. Such anomalies, called overflow or underflow, may result in exceptions or interrupts—emergency events similar to unplanned subroutine calls. The chapter, with the explanation of computer arithmetic, describes much more of the millions of instructions per second (MIPS) instruction set.