Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

THE BASIC ARITHMETIC AND MATHEMATICS OF TWO'S COMPLEMENTARY COMPUTATIONS

IP.com Disclosure Number: IPCOM000148990D
Original Publication Date: 1975-Apr-30
Included in the Prior Art Database: 2007-Mar-30

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 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-

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 27% of the total text.

Page 1 of 14

[This page contains 1 picture or other non-text object]

Page 2 of 14

[This page contains 1 picture or other non-text object]

Page 3 of 14

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

[This page contains 1 picture or other non-text object]

Page 4 of 14

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 --- + 0-2 -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 2-18

Example

-

1-7/01 = +7/8 = O . l l l O O O E * 000
1.000111---I1 ones replaced by zeros and zeros

+ 0.000000---01 add 2

-18 by ones
1.001000--00 representation of -718

1100 represent?

Examp l e

Example

What does 1.111---

[This page contains 1 picture or other non-text object]

Page 5 of 14

find its absolute value, subtract

it from 0 .

0,oo---00000
I.. 11---11100

-.-

-16

                  0.00---00100 representation of 2 Hence the given number is -2 -16

Example

-18

Positive fu1.1 scale = 1 - 2 = 0.111---111 .

Example

Negative foil scale -1 = 1.000---000 .

Example

-1 + 2-18 = 1.000---001 .

t

Example

-2-l8 = 1.1111---111 .

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...