THE BASIC ARITHMETIC AND MATHEMATICS OF TWO'S COMPLEMENTARY COMPUTATIONS
Original Publication Date: 1975Apr30
Included in the Prior Art Database: 2007Mar30
Publishing Venue
Software Patent Institute
Related People
Epstein, George: AUTHOR [+2]
Abstract
Thc Basic Arithmetic and Mathematics George Epstein Computer Science Department Indiana University Bloomingtan, Indiana 47401 This note provides basic information on two's complementary computations, describing addition, subtra,t;ion, left and right shifts, multiplication, and division. An appendix provides mathematicaldetai.1 on the multiplication and division processes. INTRODUCTION It is essential that there be a disti.nction between the computer representation of a number and its actual arithmetic value. A corn puter represents a number by means of a sign digit xo and nonsign digits xi (f 1, 2 18, say); that is, the computer cont ains the number i n the form The relationship between the actual arithmetic value x , and the binary X X where the sign digit xo is 0 if x is positive and x is 1 0 if x is negative. Thus for positive numbers (x, 3 , digits xO, I, 2 , X18 depends on the arithmetic system being used. In twots complementary computations 1 I x 1 and the arith
Thc Basic Arithmetic and Mathematics
George Epstein
Computer Science Department
Indiana University
Bloomingtan, Indiana 47401
This note provides basic information on two's complementary computations, describing addition, subtra,t;ion, left and right shifts, multiplication, and division. An appendix provides mathematical
detai.1 on the multiplication and division processes.
*
INTRODUCTION
It is essential that there be a disti.nction between the computer representation of a number and its actual arithmetic value. A corn puter represents a number by means of a sign digit xo and non
sign digits xi (f = 1, 2  18, say); that is, the computer con
t ains the number i n the form The relationship between the actual arithmetic value x , and the binary
X X
where the sign digit xo is 0 if x is positive and x is 1
0
if x is negative. Thus for positive numbers (x, = 3 ) ,

digits xO, I, 2 , X18 depends on the arithmetic system being used.
In twots complementary computations 1 I x < 1 and the arith
metic value x of the number is given by the equation
and for negative numbers (x0 = 1) ,
Example
47/8 = 1°1/2 + 1°1/4 + 1*1/8 + 0*1/16 t 0*1/32 t  + 02 18
so that the computer contains + 7/8 as O.lll000~~*00
,
7/8 = 1 + 1/8 and
1 i 8 = 001/2 + 0*1/4 + 1*1./8 + 0*1/16 + 0*1/32 +  + 0.2 18
so that the computer representakion of 7/8 is 1.0010000**00 .
In other words, if x is negative, write the computer repre sentation of the positive number x + 1 and set xo = 1 to obtain the computer representation for x .
An alternate procedure for obtaining the computer representa
tion of a negatlve number is t o w r i t e the computer representation of the absolute value of the number, replace zeros by ones and ones by zeros and add 218
Example

17/01 = +7/8 = O . l l l O O O E * 000
1.000111I1 ones replaced by zeros and zeros
+ 0.00000001 add 2
18 by ones
1.00100000 representation of 718
1100 represent?
Examp l e
Example
What does 1.111
find its absolute value, subtract
it from 0 .
0,oo00000
I.. 1111100
.
16
0.0000100 representation of 2 Hence the given number is 2 16
Example
18
Positive fu1.1 scale = 1  2 = 0.111111 .
Example
Negative foil scale 1 = 1.000000 .
Example
1 + 218 = 1.000001 .
t
Example
2l8 = 1.1111111 .
Let a number in the computer have the arithmetic value x .
Then the number which represents 2"*x is obtained by shifting the original number l e f t n times and inserting zeros i n the n vacant positions at the right of the number (least significant end). Example
22* (2 18) _{= }2r16 = 1.1...