PLOTS OF ADD, SUBTRACT, AND MULTIPLY
Below are 3D plots of addition, subtraction, and three forms of multiplication, of
unsigned numbers, using “computer arithmetic.” These plots were produced by Mathe-
matica. For each function, two plots are shown, one for a word size of three bits and the
other for a word size of five bits.
This material was suggested by Guy Steele.
8 32
0 0
6 24
2 8
4 4 16
y 16 y
x x
6 2 24 8
8 0 32 0
FIGURE 1. Plots of x + y (computer arithmetic).
8 32
8 32
6 24
6 24
4 4 16
x 16 x
y y
2 2 8 8
0 0 0 0
FIGURE 2. Plots x – y (computer arithmetic).
1
In Figure 3, the vertical scales are compressed; the highest peaks in the left figure are
of height 7·7 = 49
8 32
6 24
4 8 16 32
y 6 y 24
2 4 8 16
2 x 8 x
0 0
0 0
FIGURE 3. Plots of the unsigned product of x and y.
8 32
6 24
4 8 32
y 6 y 16 24
2 4 8 16
2 x 8 x
0 0
0 0
FIGURE 4. Plots of the low-order half of the unsigned product of x and y.
2
8
32
6
24
4 8
y 32
6 y 16
24
2 4 8 16
2 x 8 x
0 0
0 0
FIGURE 5. Plots of the high-order half of the unsigned product of x and y.