5. Arithmetic Operations.

a. General. Now that you know how to count and convert, the next step is to perform addition and

subtraction in nondecimal numbering systems. To understand how the computer computes, you must

understand these mathematical operations and how to perform them. The first task is to learn the machine

methods of performing arithmetic computations. Knowledge of how the computer is designed is not

required to use these methods. Although this chapter introduces some computer terminology and theory,

the primary concern is with pencil and paper solutions that result when you use the same methods that

computers use.

b. Rules for Addition. The rules taught in elementary school for adding decimal numbers can be

used in adding numbers in any system. The only differences are the breakpoints in the nondecimal

systems. The counting and breakpoint for carrying is the important operation. In the following

descriptions of addition, we will emphasize the binary system.

(1) The rules of binary addition are simple because of the small radix. The rules differ from

regular decimal addition only when the radix or breakpoint is reached.

(a) Adding 0 and 0 yields 0:

(b) Adding 0 and 1 or 1 and 0 yields 1:

(c) Adding 1 and 1 yields 0 with a carry of 1. This rule shows the point at which the radix of

the binary system is reached:

(2) Single addition. Using the rules for adding binary numbers, the following are examples of

how to add and how to check the results in the decimal system.

(a) In this example, adding 0 and 1 yields 1; adding 1 and 0 yields 1. This gives the correct

answer of 11 (note that the least significant digit is to the right). The check in decimal numbers yields an

answer of 3 which equals binary 11.

Integrated Publishing, Inc. |