Advances in COMPUTERS VOLUME 6
Contributor6 to This Volume
Advances in
COMPUTERS editad by
FRANZ L. ALT National ...
37 downloads
1080 Views
18MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
Advances in COMPUTERS VOLUME 6
Contributor6 to This Volume
Advances in
COMPUTERS editad by
FRANZ L. ALT National Bureau of Standards Washington, D.C.
MORRIS RUBINOFF University of Pennsylvania and Pennsylvania Research Associates Philadelphia, Pennsylvania
asuociate editors A. D. BOOTH R. E. MEAOHER
VOLUME 6
Academic Press. New York. London4965
ACADEMIC PRESS INC. 111 Fifth Avenue, New York,New York 10003
UdedEhg&mlQ~~~h6tiby ACADEXfC PRESS INC. (LONDON)LTD. Berkley Bqusrs Houme, London W.1
Contrlbutora to Volume 6
P. L. BMWELLINI,The Moore 8 c h l
of Electrical Engineering, University of Pennsylvania, Philadelphia, Pennsylvania H ~ ~ VL. E G~RNER, Y Department of E W M Engineering, The University of Michigan, Ann Arbor, Michigan HIURBERT GELERNTER,I B M , Wvatson Research Center, Yorktown Height%, New York IRVING JOHNGOOD, Trinity College, Oxford, England and Atlas Computer Laboratory, Berbhire, England CLAUDEE.WAL~TON, IBM Corporation, Beth&, MarylanrE CHARLESR. WIOKMAN, 0rdmm.x Center, Honeywell Inmymat&, West couina, California
This Page Intentionally Left Blank
The present volume continues to reflect the editors’ conviction, manifested in the earlier volumes of this serial publication, that application of digital computers to areas akin to human thinking-machine-aided cognition, to borrow a term from another environmentis one of the most eotive frontier8 of development in our time. Articles in this volume deal with two such areas: information retrieval and what is called “ultraintelligent machines.” The latter article represents a new departure for this serial publication in that it contains not information but opinions, not a survey of the past but a look a t the future. One article in an earlier volume, on microelectronics, had some of these features; and indeed, the physical systems envisioned in that article give a degree of plausibility to the speculations on ultraintelligence presented here. Together with the discussion of self-organizing systems in the previous volume, and with those of game playing, speech recognition, and language translation by computer presented in earlier volumea, these articles give a panorama of some of the most challenging potentialities of computers. With the two articles on digital training devices and on man versus computer in space missions, Advance8 in Computers enters the field of real-time control for the first time. It should be quickly pointed out that the term “digital training devices” refers not to claasroom teaching machines but to simulators which assist in the training of pilots, ship crews, etc., by presenting a replica of the physical environment for which the trainee must be prepared, together with changes in the environment c a d by the trainee’s own actions. The discussion of the use of men and of machines in space missions points out-in general terms only, for obvious masons-the factors pro and con in the question whether human observers traveling in space vehicles could not be dispensed with and replaced by sophisticated instruments. An artiole on number systems and arithmetic in digital computers continues, broadens, and updates the survey of the same topic in Volume 1. Finally, computer applications to scientific problems, always a subject of interest to “Advances”, are represented here by the paper on particle trace detectors, notably bubble chambers end spark chambers, which have recently acquired a leading position aa a tool for research in particle physics, and ale0 aa a large and sophisticated application of computers. hAN2
8eptember 1965
L. ALT
MORBIS RUBINOPF vl I
This Page Intentionally Left Blank
Contents
. . . . . . . . . . . . . . . . . . . . . . . . . . . ,
VOLUME 6 P~EFACJE . . . . . . , CONTBNTS OF Pmnous V O L ~ S
cO”RIBUT0RS TO
V
vii xii
Information Retrieval CLAUDE E. WALSTON
.
. . . . , . . . . . . . . 6. Automatic Aids to Retrieval and Dissemimtion . . 6. Automatic Fact Retrieval . . . . . . . . 7. Conolusion . . . . . . . . . . . . . References . . . . . . . . . . . . . 1. Introduction . . . . . . . . . 2. The Information-Storage and -Retrieval Cyole 3. Tspes of Retrieval . . . . . . 4. Automatic Document Indexing and Clrtssification
.
1 4 6
,
.
. . . .
.
8 18
22 26 28
Speculations Concerningthe First Ultraintelligent Machine IRVING JOHN GOOD
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1. Introduotion , . . . . . . . . 2. Ultr&ntel.ligent MaohinesandtheirValue . . 3. Communioation &B Regeneration . . . . . . . 4. Some Repmentationsof “Meening” and Their Relevance to Intelligent Machines . . . . . . . . . . 6. R e d and Information Retrieval . . . . . . . . 6. Cell Aseemblies and Subassemblies. . . . . . . 7. An h m b l y Theory of Meaning . . . . 8. TheEoonomyofManing . . . . . . 9. Conclueions . . . . . . . . . LO. Appendix: Informational and Causal Interactions . Referenoes . . . .
. .
.
31 33 37 40
43 64 74 77 78 80 83
Digital Training Devices CHARLES R. WICKMAN
. . . . . . . . . . . . . . . . . . . . . . . . .
1. Introduotion 2. TrainingRequirements
89 90
Ix
CONTENTS
.
3 Training Simulators Using General purpoSe Digital Com-
. .
puters
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
4 Propmming Considerations 6 Non-TrainingUsesofaTrainingSimula~r 6 Future Training Devioe Requirements
.
. . . . . .
101 122 126 128
Number Systems and Arithmetic HARVEY L GARNER
. Introduotion . . . . . . . . . . . . . . . Classifioation and Chmaoterization of Number Systems. .
1 2 3 4 6 6 7
. Addition . . . . . . Redundant Number Systems . Multiplioation . . . . . Division . . . . . . . Residue Number Systems . 8. Digit by Digit Computation Referenoes . . . . .
. . . . . . . . . . . . . . . . . .
. . . .
. . . .
. . . .
. . . . . . . . . . . . . . . . . . . . .
. . . .
. . . . . . . . .
131 132 143 167 163 168 177 182 191
Considerations on Man versus Machlnes for Space Probing P L BARGELLlNl
.
. Introduotion . . . . . . . . . . . . . .
1 2 3 4 6
. Humanand~ohineIntelligenoe . . . . . . . . . Problem DefhitioninEngineering Terms . . . . . . Summary of Information Handling by Man and Maohines .
. Information Capaoity of the Human Channel; Aooustio and VisualStimuli
. . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 8. Comparison of the Bit Rate in Manned and Meohadzed Systems . . . . . . . . . . . . . . . . 9. Considerations on the Communioation Linlrs . . . . 10. Possible Solutions and Reoommendations . . . . . 11. Conolusion . . . . . . . . . . . . . . 6 Somesthetio Communioation 7 Data Prooessing by Maohines
Bibliography
. . . . . . . . . . . . . .
196 197 204 206 208 216 218 221 222 224 226 226
Data Collection and Reduction for Nuclear Particle Trace Detectors
HERBERT GELERNTER
.
. . . . . . . . . . . . . .
1 Introduotion 2 Bubble Chambers 3 The Data Reduotion Problem for Bubble Chambers
. .
X
. . . . . . . . . . . .
. .
229 231 236
CONTENTS
. Advances in Automatic Data Analysis for Bubble Chambers
4 6 0 7
. Spark Chambers . . . . . . . . . The Data Problem for Spark Chambers . . . Filmless Operationof Sparkchambers . . 8. Some Other Particle Trace Detectors . . 9. On-Line Data Processing in Physics . . . Bibliography . . . . . . . . . . Author Index . . . . . . . . . . . Subjeot Index .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . . . . .
246 270 277 279 290 293 294
297
302
xi
Contento of Volumo 1
General-Purpose Programming for Businege Applioations CALVIN
c. a0-B
Numerid Weather M o t i o n NORMANA. PHlLLIPs The Present Status of Automatio !l!ranahtion of Languagee YmOSWA BAR-Programming Computere to Play Games ARTHUR
L. SAMUIDL
Maohine Reoognition of Spoken Words RIOEARDFATIDHOUND
Binary Arithmetio Gn~oaalpW. R I D ~ S N I D R
Contenta of Volumo 2
A Survey of Numerioal Methods for Parabolio Differential Equationa JIMDOUCILISB, JR. Advanoee in Orthonormalizing C0mputa;tion PHILIPJ. DAVISAND PHILIP Rmmowrm
MiomleotronimUsing Eleotmn-Beam-Aotivatedlldaohining Teohniques ICBINNIDTE R. SHOULDBL~S Reoent Development in Linear Progrmming SAUL I. GA8S
The Theory of Automata, a Survey ROB~RT MONAUGHTON XI I
ConGnta of Volume 8
The Computation of Satellite Orbit Trajeotoriea SAMUEL D. C O ~ E Multiprogramming E. F. CODD Reoent Developments in Nonlinear Propmming WOLFID
Alternating Direotion Implioit Methods GARBIUTPB I R K H ORIUHARD ~, 8. VARGA,AND DAVIDYOTJNQ Combined Analog-Digital Teohniques in Simulation Haru>LD K. 89aaaas~lu, Information Teohnology and the Law RERID c. LAWLOR
Contonta of Volume 4
The Formulation of Data Prooeesing Problems for Computers
WILLIAM C. MOGEE A l l - D h g ~ ~cirouit t i ~ TeohniqUw DAVIDR. BENITION AND HEWP~T D. CRANE Computer Eduoation HOWARD E. TOMPKINS Digital Fluid Logio Elemente
H. H. GLAIWTLI Multiple Computer Systems
WILLIAM A. CrJaTW xiii
Content. of Volume I
The Role of Computers in Eleotion Night Broadoasting JAUKMOBEMAN Some bulb of Reaearoh on Automatio Programming in Eastern Europe WLaDYSwLW
ToasgI
A Disoussion of Artifioial InteUigenoe and Self-Organization GORDONPASE Automatio Optioal Design ORHSTHSN. STAVRQUDIS Computing Problems and Methods in X-Ray Crystallography -8 L. COULTm Digital Computers in Nuolear Reaotor Design ELIZABHTH C u m An Introduotion to Prooedure-Oriented Languages
D. HWSKBIY
xlv
Advances in COMPUTERS VOLUME 6
This Page Intentionally Left Blank
Information Retrieval CLAUDE E. WALSTON ISM Corporation Lthesda, hkwland
.
1. Introduotion 1.1 Soope of the Diaoussion 1.2 The Informetion Problem , 1.3 The Weer and Hie Neede 2. The Information-Stomge and -Retrieval Cyole 3. Tspeaof Retrieval * 4. Autometio Dooument Indexing and Cleeeification 4.1 Introduot~ryCommenta 4.2 Autometio Indexing 4.3 Automatio classification 4.4 Full Text Indexing 6. Autometi0 Aida to Retrieval and Dieseminetion 6. Automtio Faat Retrieval 7. Conoluaion
.
.
. .
References
. .
.
. .
.
.
1 1 1 3 4 6 8 8
10 14 17 18 22
28 28
1. Introduction 1.1 Scope of the Discussion
Information retrieval is a broad and, as yet, loosely defined subject. Information retrieval, as the term is generally used, implies the selective recall of stored knowledge. It would not be possible in this discussion to oonsider information retrieval in all its ramifications. Rather, we shall examine from a historical point of view the role of computers and automation in solving retrieval problems. At the same time we have tried to prepare a selected set of references, which will provide a eatidaatory entree for the reader interested in pursuing the subject
further. 1.2 The Information Problem
A peat deal of attention has been devoted in both the popular press and the technical press to the problems generated by the “information explosion,” as it has been popularly identified by some. In addition, government committeee have explored the oost and wasted effort 1
CLAUDE E. WALSTON
resulting from the duplication of effort engendered by failures in the information-dissemination and retrieval process. The impression oreated by this publicity is that the problem is a fairly recent one, whereas it proves, upon closer examination, to have existed for a surprisingly long time. De Sola Price [I21 traces the development of this problem m far aa the scientific community is ooncerned. The present information problem might be mid to have had its genesis in the invention of the printing press by Gutenberg in the mid-fifteenth century. However true that may be, its growth to sizable proportions wm assured through the device of the learned paper and the invention of the scientific journal in the seventeenth century. The oldest surviving soientific journal is the philosqhbt? Traneactim of the Royal 8miety of London, first published in 1666. The initial growth of scientific journals was slow and irregular;by 1760 the number being published waa only ten. During the next fifty years, however, the growth pattern began to change; by 1800, the number of published journals had reached a hundred. By 1860 a thousand were being published and by 1900 the number was ten thousand. This rapid growth is continuing and today we are not far from the hundred thousand mark. As early m 1830, when the number of journals being published had reached the level of three hundred a year, scientists were already in trouble; it was impossible even then to keep abreast of all the work being reported in scientifio journals. The solution to this dilemma was the invention of the abstract journal. This in turn hm followed a growth pattern similar to that of the scientific journal. Today there are approximately three hundred abstract journals being published, and it has been suggested that perhaps the next step should be the creation of an abstract journal that abstracts the abstract journals! It is obvious then that the “information problem” is not a new one and that attempts to find solutions to it have been made over the past hundred years. That greater suocess has not been attained can be attributed to a number of factors. One factor of course is the complexity of the problem ooncerned with the communication of products of the human intelleot between individuals and groups of individuals. Since it is so oomplex, the development of a theoretical foundation desoribing the prooess has been very slow. This is true even if we narrow our soope of interest and concentrate on the problems of storing and retrieving printed information. One of the difficulties in developing a theoretioal foundation has been a laok of both experimental data and the tools with which to collect and prooess the data. The advent of the high-speed digital computer has provided the tool necessary to let experimentation proceed, and appears to have provided one of the o r i t i d elements in the solution of the information-retrieval problem. 2
INFORMATION RETRIEVAL
A factor contributing to the difficulty in solving the scientific information problem has been the growth of scientific activity in the United States as a result of the large-scale support of research and development activities by various agencies of the federal government. Congress has taken a close look at various facets of these activities and has been particularly concerned about waste and duplication resulting from poor dissemination of technical information or from an inability to retrieve information about technical programs having explored the same areas or solved the same or similar problems. In particular, the Committee on Government Operations of the United States Senate and its Subcommittee on Reorganization and International Organizations, chaired by Senator Hubert Humphrey, has done a thorough job of examining both federal and non-federal programs for information processing and the problems of coordinating information among federal agencies. The reports of these groups [41, 421 contain much information on the information problem and the programs initiated in an attempt to solve this problem. The House of Representatives, concerned with another aspect of the information problem, has created an Ad Hoc Subcommittee on Research Data Processing and Information Retrieval, chaired by Roman Pucinski, that has been conducting a series of hearings [40] on the need to create a national information center to solve the scientific information problem. Finally, The President’s Science Advisory Committee [30]has explored the responsibilities of the technical community and the government in the transfer of information. The findings and recommendations of this study provide additional information on the nature of the scientific information problem. This discussion has briefly indicated some of the factors that have led to an increased interest in information retrieval. Some of these factors and the statistics quoted here have been suggested as justification for launching large-scale programs for automating information retrieval. Bar-Hillel [3] challenges this approach and questions whether information retrieval is in fact approaching a crisis, as some have maintained. He suggests that specialization has been the defensive mechanism that has evolved to combat the geometrical rate of increase in scientific and technological publications. Green [I71 also questions whether the information explosion is real, and suggests that our ourrent information-retrieval resources are growing and adapting themselves to solve the problem. 1.3 The User and His Needs
Any consideration of information retrieval must reflect the particular requirements of the user of that information. This seems quite obvious, 3
CLAUDE E. WALSTON
but too often in the past it has either been ignored or only oureorily examined by those responsible for implementing information-retrieval systems. An examination of the information needs of potential users of a retrieval system reveals a number of information problems. Tukey [39] has suggested the following olassifioation of user needs: (1) I n f o m a t h delivery. The automatio delivery of information in whioh the user has to take little or no initiative, e.g. monthly administrative reports automatioally delivered to the appropriate users. ( 2 ) Injomathn r e t r i e d . The delivery of information by a librarian or information speoialist in response to a very speoifiocllly stated request. (3) Informatiolt primit. The searoh by the prospective user for information to be utilized for hypothesis formulation or hypothesis testing. Quite often the user has only a vague idea of what he needs. (4) Infowmtirm brm8ing. This, LLB its name implies, is a general seeking of information, sometimes with an area of interest in mind, quite often with none. These needs, whioh range from the speoifio to the very vague in terms of the definition of the information required by the user, may all exist as requirements to be satisfied by a given information-retrieval system design, or in some oases only one oategory may have to be satisfied. In addition, a given user’s needs may ohange from oategory to oategory during the oourse of a year as his work progresses through various phases, or as the nature of his assignments ohanges. The variety of users’ needs to be satisfied, ooupled with the wide range of input data that may have to be prooessed, oomplioates the system design and has made neoessary the present tailoring of eaoh system to fit its partioular applioation, although eaoh system will oonsist of funotions and will utilize teohniques oommon to all the others, 2. The Informationdtorage and -Retrieval Cycle
It is not our intent in this discussion to oonsider the fundamental prinoiples of the malysis and design of information-storage and -retrieval systems. This is a subjeot worthy of separate disoussion in its own right. However, in order that the si@oanoe of the teohniques oovered in the later seotions of this artiole ocln be more olearly understood, we should take a brief look at those funotions that must be performed in a retrieval system. Any information-retrieval aystem, whether it is entirely manual or contains some degree of automation, must exeoute the same funotions. The operation of the system is 4
INFORMATION RETRIEVAL
cyclic and these functionsfall into one of two cycles: the input or storage cycle, and the output or retrieval cycle. I n the ideal system these two cycles me completely independent; that is, the user should be able to retrieve the information needed to satisfy his query regardless of the manner in which the input information was identified, tagged, and organized for storage. In the less-than-ideal current systems design octpability, this is not true, and the user is very much a t the mercy of the indexer who prepared the input for storage. The input cycle is composed of the following functions: (1) Information collection and screening (2) Information conversion
(3) Indexing (4) Storage
The output cycle consists o f (1) Query formulation and transformation (2) Search
(3) Retrieval (4) Data p d g (5) Output and dissemination.
These functions, while existing in any system, will vary in importance or significance from application to application, depending upon the nature of the information to be handled and the nature of the equipment, if any, that may be used. Information collection and screening are the processes of identifying the information that should be stored in the system, determining where it is, physically acquiring it, and selectively evaluating it to determine whether it should be stored. In some c w s the collection of information to be processed in a retrieval system may be a monumental task. I n other instances so great a volume of information may be available that its evaluation and screening may be a difficult and time-consuming activity. After the information has been screened, it may not be in a form that can be handled in the system. It may have to be translated. It may need to be decoded. If the system contains a computer, the information may have to be converted to a machine readable form, i.e., punched cards, punched paper tape, magnetic tape, etc., and this conversion may be a major and costly problem. The most crucial part of the input cycle is the indexing function. The success and effectiveness of the total system depend upon how well this function is carried out. By indexing we mean the process of determining the nature of the input, and tagging it in such a f d i o n that the nature of the information it contajns is suocinctly identified for further prooesaing in the 5
CLAUDE E. WALSTON
system. If the indexing is poorly done we run the risk of losing the information once it is stored, by virtue of the fact that we cannot identify it as being pertinent to a user’s query. The indexing task is discussed in detail in Section 4. It should be apparent that, depending upon the particular application, the indexing function might precede the conversion function, Once the indexing function is complete, then the original input item, the bibliographic data that provide background and control data about it (source, date, accession number, etc.), and the index tags produced by indexing must all be properly organized and stored in such a manner that they can be utilized in the retrieval process. The output cycle is to a certain extent an inverse of the input cycle. This cycle begins with the formulation of a query by a user of the system, who specifies the nature of the information he desires and any constraints or restrictions to be imposed on the system to assist in narrowing the scope of the search. The query, once it is formulated by the user, must usually undergo a certain amount of manipulation and transformation to put it in a form that contains the elements and a structure similar to those resulting from the indexing function. The search operation is an attempt to find a match between the transformed query and some subset of the index tags accumulated in the system in order to identify those items of information that answer the original query. I n the ided case, an exact matoh always occurs between the query and the index items; in real life this happens very infrequently, and the usual problem is what decision rules to follow when there is only a partial match. As a result of this process, the items to be retrieved are identified along with their location in the store, and they can be retrieved either in their entirety or in some reduced representation (e.g., lists of titles or abstracts). Again, depending on the nature of the information-retrieval system, the retrieval process may be as simple as using a locator number to manually retrieve a document from a filing cabinet, or as complex as using a computer to retrieve abstracts stored on magnetic tape and to print them out at a remote location for the user’s perusal. The retrieved information may need to be processed before it is delivered to the user; e.g., he may be interested in counts or averages, or may want statistical analyses performed on the retrieved information. Finally, after any processing, the output function assures that the retrieved information is presented to the user in a form in which he can use it.
3. Types of Retrieval Up to this point we have been discussing information retrieval in general terms and have m d e no attempt to be specific about the nature 6
INFORMATION RETRIEVAL
of the output that may be delivered by the system. One method used to distinguish differences between retrieval systems has been to cIassify them with respect to their output. Bourne [S] identifies four types of system :reference, document, fact, and information retrieval. Referenceretrieval systems provide references to documents containing the information sought in response to a user’s query. Document-retrieval systems go one step further and provide complete copies of the documents themselves in response to a query. Fact-retrieval systems yield specific information (e.g., physical properties of materials, number and capacity of tantalum capacitors that failed last month) in response to a query. Information-retrieval systems, which are the most complex since they must deal with concepts, are those able to provide direct answers (not references) to such questions as, “What is the most recent theory on the role of nucleation in cavitation?” Despite this useful distinction among retrieval systems, information retrieval has become firmly established through common usage as the generic term that includes reference, document, and fact retrieval, and the reader will discover that he must learn from the context which type of system is being discussed. A great deal of work has been done on the development of factretrieval systems, largely as a result of both the pressure and the support coming from the Department of Defense to satisfy urgent requirements for command/control and intelligence applications. Systems designed for these applications must have the ability to handle a variety of data organized into many Merent files and to process a wide range of queries against these files. These systems have come to be known as formatted file systems, since the input data are arranged into various formats for ease of storage and retrieval. A typical formatted file system will consist of four general programs: ( 1 ) An executive control program (monitor)to allow job processing on
a priority basis and to permit interrupts for answering queries or entering new data. (2) A jile modiJication program for the generation of new formatted data files or the modification or restructuring of existing files. (3) A jile maintenance program for file updating and error correction. (4) A jile query program for information selection, processing, and report generation.
The files handled by a formatted file system may be structured from many types of data ranging from small, fixed-length items to large variable-length items containing repetitive information. The system is designed to allow the user flexibility in handling his data. He is not limited in the number or variety of files that can be defined and handled 7
CLAUDE E. WALSTON
by the system, nor is he oonatrained to follow the format of an existing file in the event of a ohange in the applioation for which the file was intended, or of a ohange in the input data to that file. The system query programs provide the user with a flexible data seleotion and report generation capability. A logical query language is used to select the desired records from the files. Prooessing routines are provided to reorder (sort) and summarize the data (totals, subtotals, averages) after seleotion. A report generation oapability allows the oreation of a large variety of formal reports from any single file. Some formatted file systems now in operation provide for multiple file queries, i.e., the retrieval and correlation of data from several files without manual intervention. The system also allows for the incorporation of subroutines to perform any special purpose functions that may be neoeesary. A detailed disoussion of formatted file systems is worthy of separate tmtment and is beyond the scope of this article, but we have mentioned them here beoause they represent an important segment of the work on information retrieval. Postley and Buetell[29] describe one such formatted file system that they have developed, possessing some of the oharaoteristios desoribed above. In general, the faots entered into a fact-retrieval system have to be seleoted and organized manually before they oan be entered into the system. The problems of so organizing the data that it can be readily stored and retrieved have presented mmy ohallengesto system designers, m d have given impetus to the development of new teohniques, such as those oovered by Cheydleur in his article “Memory Allocation Methods for Aesooiative Storage and Retrieval” (this volume). A large part of the research m d development aotivity in the information-retrieval field has oentered on problems associated with referenoe- and document-retrieval systems. The emphrtsis has been on the development of automatio indexing and clmsifioation techniques, and in Seotion 4 we review the efforts in that partioular area. Computers have been applied in other faoeta of the retrieval problem as well, whioh are examined in Seotion 5. Automatic faot and information retrieval represents a muoh more diffioultproblem and, although not as much effort hm been directed toward the development of these systems, we briefly review some of the current work in Section 6. 4. Automatic Document Indexing and Clruriflcation 4.1 Introductory Comments
The most oritioal part of the storage and retrieval operation is the indexing funotion. The indexing of an item of information prior to its 8
INFORMATION RETRIEVAL
inclusion in the information-retrieval system establishes the attributes to be used in identifying the particular item for the remainder of its life in the system. A great deal of thought and effort has been devoted to the prooess of indexing and to the development of techniques and prooedures for uniquely identifying, selecting, and describing those attributes of a given item to enable unambiguous retrieval at a later date in response to a request for the information it contains. Space does not permit a detailed description of the vasious indexing methods that have been implemented or proposed. For a discussion of indexing problems in general and a review of the major indexing systems, Vickery [43] is a good source of information, although the beginner may find his presentations fairly difficult reading. Bourne [8] is also a good source of information, easier to read than Vickery but not as detailed, although covering a broader scope and providing an excellent set of references for pursuit of the subject in more depth. Becker and Hayes [5] give a good discussion of indexing from the librarian’s or information specialist’s point of view, and a preliminary discussion of theoretical considerations underlying information-storage and -retrieval system design. Jonker [I81 envisions all indexing systems as constituting a continuum, the descriptive continuum, aa he has entitled it. A t one end of the spectrum are hierarchical classification systems, such as the Dewey Decimal Classification. In the middle of the spectrum is subject heltding indexing, while at the other end of the continuum is keyword indexing, or coordinate indexing, as it is also called. The hierarchical classification system assumes that the information contained in the items being indexed can be organized into a tree structure, the so-called “tree of knowledge.” Figure 1 is a hypothetical example of a hierarchical
Prop-jet
Jet
Piston
FIG.1. A m p l e hieramhicd ckification system. classification system. The tree structure exhibits two logical types of relationship; first, the generic relationship of each element to the classes 9
CLAUDE E. WAWTON
above it (e.g., the relationship of jet bombers to the 01- of military airoraft) and, seoond, the ooordinate relationship between subordinated olasses (e.g., relationships among jet bombers, prop-jet bombers, and piston bombers). In a subjeot heading index, the information is organized into a series of oategories, all of equivalent rank and labeled with a desoriptive heading. The familiar yellow pages of the telephone book are an example of a subjeot heading index, Keyword indexing is aohieved by the seleotion of signifiomt or meaningful words or oombinations of worda (inoluding numbers or symbols) oonttlined in the input item. Retrieval is made through the “omrdination” of these keywords to identify dooumente oontaining the desired information. One of the pioneers in the development of ooordinate indexing systems is Mortimer Taube, omtor of the UNJTERM(unit term) indexing system [37, 381, perhaps the best known of the ooordinate indexing systems. The indexing funotion has been in the past and is today essentially a manual operation. It has suEered from the usual clerical errors involved in manual operations. More importantly, it suffers from the problems of inoonsistenoies-those inoonsistenoies that arise from the differenoes in emphasis and interpretation given to the same dooument by two different people, as well as their different interpretation of the indexing instruotiona themselves. Furthermore, an indexer may very well index the same dooument differently if it is indexed at two widely separated points in time. In addition, with the oontinuing inorease in the generation of doouments, books, and other items of information eaoh year, and with a laok of trained indexers as well rts the limited output per indexer per day, there is great pressure to develop automatio methods of indexing to overcome these problems. Until the advent of the digital oomputer, there was no tool available that gave promise of being able to solve the indexing problem. Consequently, the initiation of researoh into teohniques for automatio indexing has been a relatively recent event. 4.2 Automatic Indexing
One of the earlier approaohes to meohanized indexing was that suggested by H.P. Luhn [ZI].Luhn’s approaoh was brtsed upon the premise that the frequenoy of word ooourrenoe in an article furnishes a useful measurement of word signifioance. A plot of the frequency of ooourrenoe of various word types in a given artiole against their rank order (that is, in the order of their frequenoy of occurrence) yields a ourve similar to that shown in Fig. 2. This ourve is the familiar Zipf’s law o w e developed by Zipf [45], who showed that the produot of the frequenoy of use, f, of words in American newspaper English, with rank order r is approximately a oonatant. Zipf’s law has been of great 10
INFORMATION RETRIEVAL
use in information-retrieval work, but has the limitation that it is true only in the center of the frequency range. Luhn further remoned that those words in the region of the highest frequencies, the common words such as “the” and “and,” for example, would constitute noise in the system and should be eliminated by establishing an upper cutoff point. Words of higher frequency would be eliminated either by comparison to a common word list stored in the computer or by establishment of a high frequency cutoff through statistical methods. He also reasoned that those words with a low frequency of occurrence should also be eliminated as not having occurred enough in the document to be significant. These words would be eliminated by establishing a lower cutoff frequency. The words that remain, derived automatically on the basis of their frequency of occurrence, are the significant words in the article. These significant words are the keywords that constitute the index to the article from which they were extracted. This approach with its simple rules for implementation lends itself quite readily to implementation on a digital computer and is usually the approach selected for automatic indexing. UI CL
r f
Lo #er cu f, f
lving powerof Significant d
s
Words by rank order ( in order of frequency )
FIU.2. A word frequenoy diegram.
Luhn carried this concept one step further to show how it could be utilized to do automatic abstracting (or extracting, to be more precise). The auto-abstract is formed by ranking each sentence in the article and 11
CLAUDE E. WALSTON
then seleoting those several sentenoes with the highest rank. The oriterion used by Lubn for ranking sentenoea is the relationship of signifioant words within the sentenoe, rather than their distribution over the sentence. Eaoh sentenoe is soanned to establish whether a portion of it is braoketed by significant words. Those portions of sentences braoketed by significant words are oonsidered, if there me no more than five nonaignifioant words between the signifioant ones. The significance faotor is oaloulated by firet establishing a oluster of words by braoketing the signifioant words, then counting the signifioant words in the oluster, and dividing the square of this number by the total number of words in the oluster. If two or more olusters ooour, the one with the highest signifioanoe faotor is taken aa the memure for the sentenoe. Autoabstrctots developed by this procedure, while not having the literary quality of abstraots developed by human abstraotors, nevertheless oonvey a general feeling for the subjeot matter of the doouments from whioh they were extraoted. Baxendae [SJ in an early investigation of soientific literature oompared three methods for automatio indexing. One method followed the approaoh developed by Luhn, desoribed above. High frequency words were deleted by reference to a table oontaining 160 words that inoluded all pronouns, artioles, oonjunotions, oonjunotive adverbs, oopula, and auxiliary words. In the artioles prooessed, deletion of these 160 terms reduoed the volume by approximately 60%. The seoond method tested waa the extraction of index terms on a frequency basis from the topio sentenoes of every paragraph in each artiole. Analysis showed that in the articles used for experiment the topio sentence was the initial sentenoe in the paragraph in 86% of the owes and the final sentenoe in 7 % of the oases. Accordingly, adopted &B a rule for indexing eaoh artiolewaa the simple process of (1)seleot the first and last sentenoe of eaoh paragraph, (2) delete the common words in these sentences, (3) extraot the high fkequenoy words remaining and use these as index tern. The third method examined was the utilization of the phrase as m index unit on the premise that the phrase is likely to refleot the oontent of an artiole more olearly than other simple grammatioal oonstruotions. To simplify maohine identification of phrclses, prepositional phrases were used and the prepositions identified by table look-up. The four words following the preposition were automatically seleoted unless a punotuation mark or a seoond preposition was enoountered. The words seleoted in this manner and ranked on a frequency basis after deletion of oommon words served as keywords for indexing the artiole. A oomparison of the three approaches indicates that they are equally effeotive in seleoting index terms auhmaticady, but the phrase approaoh haa the additional advantage that it provides m a by-product 12
INFORMATION RETRIEVAL
an automatic coordination of index terms, linking terms that have been used together in the original article. Edmundson and Wyllys [14]in 1961 made an excellent survey of those techniques that had been considered for use in automatic indexing and automatic abstracting up to that time. At the time of their survey, the proposed methods for automatic measurement of a wordye significance depended upon the frequency of occurrence of the word within the document being analyzed. Edmundson and Wyllys advanced the argument that general considerations from information theory suggest that a word’s information should vary inversely with its frequency rather than directly. They argue that the rare, special, or technical word in an article will indicate most strongly the subject of the author’s discussion, By “rare,yyhowever, they mean rare in general usage, not rare in the article itself. Thus, they suggest a new approach to the determination of a word’s significance, namely, comparing the relative frequency f of a word within the article and its relative frequency r in general use (where 0 together with the equations of motion are used to calculate the speed, course rate, and pitch angle rate at time t = n 1. Since the constants A, and A, in the equation of motion may be negative, i t is possible, by inserting absurd initial conditions, to blow up the solution of the equations of motion. I n order to protect against this, stability tests have been inserted. The stability tests are actually very weak when orders of magnitude are considered. and The values for Cn+land Dn+l are obtained by integrating l)n+l by the trapezoidal formula: (3.9) ~ n + l= Bn idt (Bn+I+ ri,) The velocity vector can then be transformed from spherical coordinates into rectangular coordinates by the standard transformation equations. The Cartesian components of velocity are then integrated by the trapezoidal formula to obtain the new position components. The method just described, using a forward integration formula followed by the corrective formula (i.e., trapezoidal formula), is discussed by W. E. Milne in Numerical Solution of Diflerential Equations (Wiley, New York, 1953). Figures 2,3,and 4 represent a complete flow diagram for the own ship motion equations.
+
+
119
CHARLES R. WICKMAN
r-
Q
T 1 1
e 8 8F
3
a
o-. Admittedly, errors exist in the equations of motion and in the integration method employed for their solution. However, in most cmes the errors are compensated for, and in all caw8 the errors are bounded. 120
DIGITAL TRAINING DEVICES
No errors exist for the w e of isovelocity motion; both the equations of motion and the integration method are exact. The motion of the submarine normally consists of isovelocity motion intermittently mixed with sequences of maneuvers such aa changes in speed, course, or depth. At the completion of a maneuver, the conning officer reevaluates his location and motion before ordering a new maneuver. Consequently, errors must be considered in terms of a definite maneuver, and the cumulative error for a complete problem becomes meaningless. The following maneuvers are possible: (a) A change from present speed to a new speed. (b) A change from present course to a new ordered course utilizing a preassigned rudder angle. This rudder angle may be the ordered rudder angle or a standard rudder angle if no rudder angle is ordered. (c) A change from a present c o m e to a new ordered course utilizing an ordered time rate of change of c o m e angle. (d) A continuous change in c o m e from a present course by utilizing an ordered rudder angle. (e) A continuous change in course from a present course utilizing an ordered time rate of change of course angle. (f) A change from the present depth to an ordered depth utilizing a preassigned depth rate. This depth rate may be the ordered depth rate or a standard depth rate. (g) Permissible combinations of the previous maneuvers.
Since definite maneuvers me completed in finite time, the errors are automatically bounded in a loose sense. Some errors are, however, bounded in a stronger sense. In each maneuver, the final value of a dominant variable is assigned. For example, in a dive the depth is the dominant variable and the ordered depth is the final assigned value. In dl cams the dominant variable attains its final value. Therefore, the only quantities that may be in error are stable (i.e., a small change in an initial condition will have a small effect on the solution) and sinoe the initial and h a 1 values of the dominant variable axe fixed, the error in time for that variable is bounded in the stronger sense. Test calculations have shown that the errors in all the variables are small, even over large ranges of parameters. In those maneuvers wherein helmsman algorithms are used (e.g., ohange in course to a new ordered course), it is difficult to evaluate errors sinm actual ship’s helmsmen differ in their characteristics. Therefore, small errors occurring in these maneuvers can be considered unimpo~t. The coefficients A,, A,, ., A,, in the equations of motion have been
..
121
CHARLES R. WICKMAN
determined utilizing the integration technique discussed. Therefore, the errors in the equations of motion and the errors in the integration technique tend to cancel each other. For example, the constant A, controls the tactical diameter. Therefore, A, was chosen so that a true solution of the equations of motion would yield a tactical diameter smaller than the true hctical diameter by the same amount that it is increased by the integration method. This ww accomplished by adjusting A, so that the tactical diameter obtained by utilizing the present integration method has the desired value. It is mentioned that the coefficients derived for simulating the attack centers are dependent upon the integration method employed. If the integration method is in any way changed, for example by changing the iteration cycle, then it would become necessary to redetermine values of these coefficients. 4. Programming Considerations
The programming considerations attendant upon a training simulator do not differ significantly from other real time programming considerations. Fundamentally the program must implement the mathematical model within the specified time constraints and within the constraints imposed by the computer inputloutput characteristics. Ideally the mathematical model should be a complete statement of the functions of the computer including all necessary problem constraints. This, together with a complete statement of the pmticular computer characteristics including input/output characteristics of the external hardware, should enable the program to be developed and coded. Seldom in real life does such a pure division of labor obtain. The problem of concurrent development of mathematical model, external htwdware, and program, compounded by less than perfect documentation of both mathematical model and external hardwtwe, makes the task of the progranuuer very difficult. These are practical problems. The theoretical problems are generally not profound. The function of the program is to provide implementation of the mathematical model and thus effectively provide correct stimuli to the training device. Because of the external equipment consideratione and the man/maahine relationship embodied in the device, the programming of a training simulator is similar to any other real-time programming problem. However, there is one important difference: the universe that the training device encompasses is closed. Also the bounds and conditions of this universe me amenable to change by the programmer. Thus, he can sometimes solve difficult programming problems by changing the characteristics of the problem. Since the programmer is generally involved in the systems design phase, he can influence the design to 122
DIGITAL TRAINING DEVICES
prevent impractical or impossible demands on the computer. The result is generally a more balanced design than will necessarily exist in a realtime system that is not a closed universe and where most of the system bounds and characteristics are dictated by invariant constraints. A training device program can be thought of as a mapping function that transforms a set of inputs, according to the dictates of the mathematical model, to produce a set of outputs. This process is cyclic and continues for the duration of the training problem. The entire training simulator can be analyzed as a closed loop function in which the total training program is a single loop entity. Internal aspects of the program may also be closed loop functions. A characteristic of training device programming is the requirement that the program be amenable to change as the training device itself is changed. This occurs not only during the device construction, but will occur on a continuing basis after the device is installed due to changes in the training problem and/or changes in the operational systems being simulated. This requirement imposes a demand on the programmer to clearly and exhaustively document the program, and also prevents him from using shortcuts or tricks that would create difficulties at some later time. For example, it is seldom allowed to have the program modify itself during execution. Address modification is permissible but command modification per se is generally inadvisable. Furthermore, the program must generally be prepared in self-contained segments, which implies that some optimizing techniques are not available to the programmer. To some extent these same considerations apply to any real-time program and should be considered by any programmer preparing a large complex program intended for extended use outside the control of the present programmer. These considerations are omnipresent in training device programming. Another consideration in training device programming, that also obtains to some extent in any real-time program, is the necessity of constructing a program to function within a system which is itself not completely defined. This creates difficulties not only in the detailed construction of the program, but makes the program checkout or debugging with the actual system extremely difficult. If an error occurs during system checkout, it is natural for the programmer to suspect the terminal equipment and the design engineer to suspect the program. If a stalemate exists, both will suspect the computer, and the computer maintenance personnel will have a low opinion of everyone. Only by mutual regard and understanding of each other’s problems can a system checkout be satisfactorily accomplished. 123
CHARLES R. WICKMAN
Since a large-scale training device will generally involve several programmers, and also because of the requirement for exhaustive documentation, it is critical that conventions and standards of docud mentation be agreed on at the onset of a program. Again, this should be standard practice for any large programming effort, but is extremely important for training simulator programming. Assuming that these are dehed, the programming effort can be subdivided into a set of tasks, which are definitely not independent nor even necessarily sequential. Program testing consists essentially of two phases: testing independent of the training device, which is similar to any program checkout, and testing with the complete training device. After all checks of the program independent of the training device have been executed, it can be assumed that the program will at least cycle and perform computstions close to those originally desired. However, it is almost axiomatic that the system will not perform satisfactorily. Three types of difficulty will be experienced. First, although great care may have been taken in constantly reviewing the interactions of the mathematical model, progmm, and external equipment, differences will be uncovered between how the program waa intended to perform and how in reality it does perform. For example, the mathematical model may be correct over most of its range but, due to a combination of implicit wumptions and computation approximations, singularities will be uncovered. These hopefully will require only minor changes, but in any c m they do require extensive and detailed analyais with the added factor of severe pressure due to the ever present project schedule. It is true that theoretically all of these interactions could be predicted and errors therefore prevented. In actual practice, however, errors will occur. A second type of error is that caused by an incomplete understanding of the desired responae. Generally this type of error includes some detail of external equipment operation. After the device hm been installed and actual training use has been experienced, many changes will be suggested. These are not errors in the usual sense. Rather they are indications of less than perfect understanding of the entire training problem and are due in large part to the subjective and qualitative determination of the training problem. The proof of the training system is simply the quality of training imparted. This can be obtained only by actual use of the device and hence only after the complete installation of the airnulator. The power of the general purpose digital computer now becomes very apparent. Many changes can be incorporated without modification of external hardware, Further, if a change involves only the computer, no lost time in use of the trainer need occur. Thus the use of a central 124
DIGITAL TRAINING DEVICES
oomputer enables modification of the training problem simply and without interference with the training schedule. The program itself has some unique characteristics. Probably foremost is the extreme variability in execution time. Generally, a real-time training program is constructed with a major invariant cycle time. A convenient cycle time for submarine attack trainers is 1 sec. For flight simulators it may be much smaller, perhaps 100 msec. I n any cme, the major cycle will be an integral multiple of the integration interval. Within the major cycle all computations are executable at least once. Minor cycles, if required, will become integral fractions of the major cycle and for convenience may be a power of 2, such aa 4, A, etc., although this is by no means required or universal. The major cycle is so chosen that all time-dependent calculations, euch as integration, are performed correctly, and so that no response delays that affect training will occur. If a student actuates a control, the aomputer response to that control must have the same temporal oharacteristics as the real control. I n a complex training simulator, it is possible for many controls to be wtuated simultaneously. The major cycle of the program must be such that all possible computations can be performed within the cycle. Queuing of student inputs is not permissible. Queuing of some instructor inputs is possible, but generally these are insignificant calculations. The major cycle therefore must be able to satisfactorily handle a worst case condition of many simultaneous events. However, the normal situation is that the worst case will not occur very often. Usually very few events occur simultaneously. Thus, the average computation load is much less than the worst cme. During that portion of the major cycle not required by the computation load the computer will generally idle, waiting for a synchronizing signal indicating the start of the next major cycle. (If minor cycles are umd, some idling will occur during each minor cycle as well.) I n a worst case condition this idle time will be minimal, amounting to only a very small percentage of the cycle. Under average loads the idle time may be SO-SO% of the total cycle. Thus during normal training exercises the oomputer may be idle over half the time. There is generally no practical way to reduce the ratio of worst case to average execution time. Queuing of inputs cannot be done without compromising training. Diagnostic testing could be programmed, but seldom will the effectiveness of such diagnostic techniques justify the cost of programming and adaptation of the hardware. Thus it is a characteristic of training simulators using a general 125
CHARLES R. WICKMAN
purpose computer that the computer will be idle for m appreciable portion of each training exercise. Another unique program characteristic apparent in the physical layout of the computer is the absence of normal inputloutput processing. A training program does not require any of the standard peripheral equipment. Once the program is loaded, the only input/output processing required is that which concerns the unique terminal devices associated with the simulator itself. Magnetic tape, high speed printers, and other adjuncts to the modern computer are not required. They are sometimes used for recording of problem progress, but seldom is such use sufficient to justify purchase of the equipment. In most other respects the program evidences no significant uniqueness. The sophistication it represents is a product of the total system concept and in particular the mathematical model. Nevertheless, it is a formidable undertaking to prepare a training simulator program, and competent programming techniques must be employed. The result is a complex and very specialized program, which is essential to successful use of the training device. 5. Non-Training Uses of a Training Simulator
Non-training uses of a training simulator can be conveniently divided into two categories, applications using the complete simulator complex and applicationsusing only the computer. These alternate uses of the trainer are generally not planned for in the original concept of the system but are an outgrowthof the power and flexibilityof the computer. Since a training simulator reproduces the operating characteristics of a real, operational system, it can be used to develop and evaluate procedures and tactics applicable to the operational system. Within the limitations of the realism incorporated within the simulator, this use can be of great value and effect considerable economies. As an example, the submarine attack trainer can be used not only to train attack teams, but also to develop and improve the basic approach and attack tactics. If several attack centers are incorporated within the same trainer, mock battles can be staged between the various submarines. Since perfect data can be recorded as to the “true” situation, the tactics employed can be evaluated against what actually occurred. Also, replays can be conducted allowing the effects of perturbations in the tactics to be studied. The use of operational systems would require time-consuming deployment of complete submarines, and, unless expensive recording equipment is installed, a complete record of the exercise would not be available. Also, it would be very difficultto reconstruct and replay the 126
DIGITAL TRAINING DEVICES
exercise. Thus, the simulator can provide a very convenient means for improving the use of the operational system. To some extent, a training simulator can be used to evaluate operational equipment. For example, if a simulator incorporates an operational fire-control computer, new operational programs can be quickly evaluated. Thus the simulator is again valuable in improving the effectiveness of the real system. In order for a simulator to be useful in improving operational effectiveness, the limitations and departures from realism of the training simulator must be completely understood. The training device was originally designed to provide the realism required for training within the stated environment. If this environment changes or if new procedures or tactics require different realism reproduction, then the evaluation of the new equipment or tactics may be based on erroneous data. The limitations must be understood and considered in the evaluation. If the computer used in a training simulator is &generalpurpose device, then it may be used for any normal data processing function. Although this is not generally planned for in the original design of the sirnulator, it is seldom difficult to augment the computer with standard peripheral equipment and thus provide a standard data processing facility. Such use of the computer when training is not being conducted presents no problems. Normally, no special provisions are required. If protection against inadvertent access to the trainer equipment is required, a simple interlock could be provided. Otherwise the computer will function in a completely normal fashion. It is theoretically possible to time-share the computer between training problems and normal data processing. The attractiveness of such an idea is based on the average idle time of the computer, aa discussed in Section 3.3. I n theory the computer would be available about 60% of the time during a normal training problem. Thus, it would appear that considerable data processing could be accomplished without interfering with training. However, there are many practical difficulties in implementing such an arrangement. Since no interference with the training can be allowed, suitable absolute safeguards must be incorporated to protect the integrity of the training program. First, it would be required that the data processing program be prevented from halting the computer. Illegal commands, overflows, and any other condition that might normally stall the computer can usually be trapped. However, a HAIT command per se poses some difficulties. Again, this might be handled by trapping. Another problem is to assure that the data processing does not modify any storage location required by the training program. Memory 127
CHARLES R. WICKMAN
barriers help somewhat but they generally me not foolproof. Because of the short time available in each cycle, it is impractical to use magnetic tape to store and retrieve either the training program or the data processing program. It is dso required that the data processing program be prevented from inadvertently accessing the trainer equipment 1/0 channels, Again this could be prevented by some form of trapping. It would likewise be necessary to prevent an inadvertent transfer of control to the training program. Perhaps memory barriers and trapping could prevent this. Since the execution time of the training program is variable, the time available for data processing is variable. It is also unpredictable. Thus an executive program would be required that could quickly and absolutely turn off the data processing. Generally the time synchronizing of the training program is accomplished by some form of priority interrupt. This conceivably could be absolute. However, if the data processing program is performing an 1/0function, it becomes difficult to wure safe and timely restart of the training program. None of these problems is impossible of satisfactory resolution, However, they do present serious practical problems and would require extensive analysis, a sophisticated executive program, and probably modification of the computer before simultaneous training and data processing could be undertaken. It hw not been done to date and probably will not be undertaken for quite some time, if at all. It is a very interesting programming problem and, if it could be solved, would make available to training simulator users considerable computer capacity. A modification of the concept is practical. During most training exercises some idle time occura due to intended interruptions of the training. These interruptions can vary from a few seconds to upwards of an hour. If a long interruption occurs, then it is practical to dump the training program on magnetic tape and load some data-processing program. When training is resumed, the revem transfer would take place. It is possible that interruptions w short w 10 sec would make such a procedure practical and attractive. However, the author knows of no instance where this has been accomplished. 6. Future Training Device Requirements
In one sense, any discussion of future training device requirements is presumptuous sinoe it must wume certctin training problems and further preempts detailed analysis of the suspected problems. However, in a broader sense, it is a necessary and desirable thing to be able to discuss the training needs of w yet undefined systems. Only by this 128
DIGITAL TRAINING DEVICES
tspe of planning can the tools be adequately developed to satisfy future training needs. Considering only the implementation of training devices, it is to be expected that training simulators will become more complex and sophisticated and make use of many advances in technology. Each generation of training devices has advanced in the use of techniques, and there is no reason why this trend will not continue. More importantly, however, there are good and sufficient reaaons why such advances me required. As has been stressed previously in this article, the underlying and paramount reason is the need to provide better training. The first consideration has to do with the role ,of man in future systems. It is expected that, aa systems become further automated, the remaining functions assigned to man will become increasingly critical. This trend has occurred in weapon systems, command-and-control systems, logistics systems, and nearly all system development. The rote function is automated, and only critical nonrote-type functions remain. Thus the expectation is that man’s role will become concerned to a much greater extent with decision processes that require judgment too complex or too little understood to automate. These types of system will in turn lead to the development of more sophisticated training simulators, and, since the decision process is amenable to logical manipulation,it is expected that the increased use of digital computers will result. This is an evolutionary process. More revolutionary changes are also expected. Today, reliability of training simulators is not of significant concern. Training problems either me of short duration or present no hazard in themselves to the trainee. Thus seldom is it economical to attempt to achieve reliabilities compatible with operational systems. However, some simulators have been designed where reliability is a very significant factor. I n space vehicle training, it is desirable to simulate mission profiles in their entirety for short missions and only the greater portion of the miasion profile for long missions.-Thus,it has become a requirement to effeot training problems of many hours’ or even many days’ duration. It then becomes important to assure that the training is not interrupted. This in turn pltwes a premium on the reliability of the training simulator. The Apollo Mission Simulator,for example, is required to operate over extended training periods. Thus the system design must reflect this requirement in the inherent system availability. The inherent capabilities of moving base simulators for modern airoraft or spaoe vehicles ctre such that injury could result to the trainee from erratic and hazardous behavior. Thus, reliability again becomes a factor to prevent the trainee from being exposed to such hazards. I n a more mundane vein, the ever increasing sophisticationof training I29
CHARLES R. WICKMAN
simulators has resulted in increased cost. In order that the simulator aohieve a reasonable oost/effeotiveness,utilization of the devioe must be high. Utilization is a result of many factors, but one that is paramount is the availability of the simulator. Thus, to ensure a high utilization of the simulator, a premium is again plaoed on reliability. The result of all of these faotors will place an increasing and somewhat revolutionary emphasis on the reliability, maintainability, and availability of the training simulator. This will be aohieved by the use of many teohniques, suoh as fundamentally more reliable oomponents or redundanoy at either the oomponent or subsystem level. However, it is not expeoted that the trrtining simulator requirements will lead the advanoe of reliabilityteohniques.Rather, the training simulatorindustry will adapt teohniques developed in the design of operational system& One area of simulation that requires extensive advanoement is visual simulation. Today very few teohniques are available to generate dynamio, panoramio, visual displays. Suoh a display would be of great value for training situations requiring out-of-the-windowtype of simulation. Airoraft landing prooedures, spaoeoraft navigation and dooking, and other teeks requiring extensive visual oues are examples of training problems needing suoh a devioe. Although some techniques are available, muoh needs to be done. Sinoe the need exists, it is hoped that a solution will soon be forthooming. This is one area where true development is required striotly for simulator use. The use of digital teohniques, and in partioular large general purpose oomputers,has enabled very oomplex and sophistioated training devices to be oonstruoted. As oomputers become more refined it is expeoted that their power will enable many advanoes in simulation techniques, Many problems beoome praotioal of solution because the computer exists. Many more require still faster and larger oomputers. However, the oomputers will be available and the problem8 will be solved. The result will be better trained personnel, not only for oomplex weapon systems but for industrial systems as well. Through training, system effeotiveness oan be improved. Thus, many direot and indireot benefits will amrue. AOKNOWUCDQ~~~JT~
The author wiahea to expreaa hia appreaiation to the many people who have oontributed to thie article. Perticuler thenke me due to Mwara. Msurioe Bark, Stenley cfryde, and Be& Yeeger for their invaluable contributiona. Special mention end acknowledgment must a h be given to the U.S.Naval Training Devioe Center, Port Waahington, New York, under whoae eegia moat of the training simulators diaouseed in this articlehave been developed. The keenly perceptive foresight of Tminiig Devioe Center persome1 ia primarily reaponeible for the fmt that digital oomputera have oome into use in training aimulatora.
130
Number Systems and Arithmetic HARVEY L. GARNER The University of Michigan Ann Arbor, Michigan
1. Introduction . 2. Classification and Characterization of Number System 2.1 Definitions 2.2 Linear, Weighted Number System 2.3 Caxry Assimilation 2.4 Interpretation 3. Addition 3.1 Notation and Basic Addition Proceases . 3.2 Caxry Statistics and End of C m y Detection . 3.3 Improved Ripple Caxry Circuitry. 3.4 Logical Organization for F a t Addition 3.6 Conclusions 4. Redundant Number Systems 4.1 Separate Carry Representation 4.2 Redundant Signed Digit Number System . 4.3 Extended Digit Number System 6. Multiplication 6.1 Multiplier Coding 6.2 Multiplier Logic. 6.3 Multiplication for Complement Coded Operands . 6.4 Nonstandard Multiplication Logic 8. Division 8.1 Nonrestoring and Restoring Division . 6.2 Generalized Nonrestoring Division 6.3 SRT Division . 6.4 Modified SRT Division 7. Residue Number Systems 7.1 Basic Characteristics 7.2 Applicationa . 8. Digit by Digit Computation 8.1 Paeudo Division and Multiplication 8.2 The CORDICTrigonometric Computing Technique Nomenclature References
.
.
.
.
.
.
.
.
.
. . . .
.
. .
. 131 . 132
. 132 . 134 . 136 . 138 . 143 . 144 . 148 . 149 . 160 . 168 . 167 . 167
. 169 . 182
.
. 183 . 164 . 167 . 167 . 188 . 188
.
. 176 . 177 . 177 . 179 . 182 . 182
.
. . .
.
.
. 183
. 170 . 173
. 188 . 190 . 191
1. Introduction
This paper is concerned with number systems and arithmetic for maohine calculation. Techniques, concepts, and models are presented 131
HARVEY L. GARNER
whioh are believed to be relevant to the development of improved mwhine arithmetio prooesses. An attempt is made to present the important bmio oonoepta and the essential flavor of eaoh item considered. Limitations in time and spctoe have required the omission of of eventual importanoe to the serious student of maohine many denumber systems and arithmetio. For these details the reader must refer to the original papers. The reference list appearing at the end of this artiole provides some direction for more detrtiled studies. This referenoe list, however, does not oonstitute a oomplete survey of the literature of maohine number systems and arithmetio. X Classification and Characterization of Number Systems
I n this section, definitions and baeio oonoepts are given, and the general properties and oharaateristios of maohine number systems axe considered. Emphaeis is plaoed on the distinotion between a representation in a maohine number system and the interpretation whioh may be given to a representation. The manner in whioh a maohine designer restriots interpretation is also considered for fixed point number system. The oonsideration of number systems for digital computer applioations may be restrioted to finite number systems. The most important oharwtaristio of maohine number systems, oontrasg to the most prevalent opinion, is finitude rather than the faot that b i n q logio ie employed. Overflows, underflows, soaling, and oomplement ooding whioh chaxaoterize maohine number systems are direot oonsequenoes of finitude and, in faot, illustrate both the detrimental and benefioial oonsequenoes of finitude. 2.1 Definltlons A finite number system N oonsists of a finite set of symbols. In general, the ohaxaoteristios of useful arithmetio require that the abstrwt structure of N be a t least an abelian group under addition. Usually the elements of N have the form of a finite n-tuple (xs, . ,q); zi is the ith digit of the number representation and is an element of Zi, the set of digit values for the ith position. If Z4is the atme set for all digit positions, the number system is said to be fixed base or oonsistently baeed, otherwise mixed base or nonoonsistently bawd. The British m o n e t q number systam is a mixed baee number system. The elements of N require interpretation if anything other than abstraot oomputation is to be obtained. Let Q be the set of interpretations. A mapping a between N and Q is required to oonneot the number representation and the interpretation. The nature of this map is an important ohmaoteristio of the number system. If the map N to Q is
..
132
NUMBER SYSTEMS AND ARITHMETIC
one-to-one and onto, then the number system is complete and nonredundant. If the map is one-to-one from N into &, then the number system is incomplete, since some interpretations in Q do not have representation in N. If the map from N to Q is many-to-one and into, then the number system is redundant but incomplete; if onto, then redundant and complete. (A mapping a of a set 8 into a set T is a oorrespondence that associates with each 8 €8 a single element t E T. A mapping is mid to be onto if every t E T is associated with some 8 EB.)
If the interpretation is dependent on the order of the digits, then the number system is a positional number system; otherwise it is a nonpositional number system. I n a nonpositional number system a is not ohanged by any permutation applied to N. Most useful number systems are positional. The number system is weighted if for all (xn, . ,xl) E N,a:N +& is determined by a weight function
..
w(X)=
xipi
q mod H,
q EQ
i-1
The digit weight of the ith digit position is pi. H is the modulus of the number system. The modulus is a characteristic of the interpretation. If Q is a finite set of fractions with magnitude less than unity then M = 1. If Q = (0, 1 , . . ., A-1} then H = A. Note that the definition for a weighted number system given by Eq. (2.1) is a generalization which includes the number systems defined by
The generalization is necesmry because it is consistent with standard lhaohine practice of executing addition mod H. A number system is a linear number system if the map a is a linear function of the digits xi under digitwise addition. An example of a nonlinear number system is the excess three code. The nonlinearity is due to the addition of the constant three. The excess three code is weighted if a digit position of weight negative three with a constant digit value of one is assumed. Alternatively, the excess three code can be classified as a nonhomogeneous linear code. We prefer the more restricted definition of linearity and thus place the excess three code in the nonlinwr category. The r e w e d binary code is a nonlinear weighted oode. It is known that the digit weights for this code are pi = f 6-1- 1
(2.3)
For the reflected code the weight of the most significant digit with 133
HARVEY L. GARNER
nonzero value is positive. The weights of all digits with nonzero value alternate in sign. Hence the sign of the digit weights is a function of the partioular number being represented. The exact weight function irs w(x)
+ xn-lpn-l(-l)z. + zn-Ppn-n(-l)"n@2"-' +... +xlp,(-l)xn@
= xnpn
-..@9
(2.4)
In general, addition is not possible or at best is extremely COMplicated in nonlinear number systems. However, in the cme of the reflected binary code, a rather simple modification, due to Lucal [39], permits the development of a reaeonable addition algorithm. The modification is the addition of an auxiliary digit xo = x n @ . . . @ x1
(2.5)
Given xo, the sign of the weight at any digit position may be determined sinoe x n @. . . @ x* = X o @ X 1 = y l (2.6)
@ xk = Yk-S @ xk-l = yk-1 (2.7) @ For a refleoted binary number representing the positive integer J, xn
20 =
{
if J i s o d d if J i s e v e n
1 0
To obtain refleoted code addition, the adder must propagate a y digit for both operands md both oarries and borrows. Lucal has shown that (x,,-~, , , xl, xo) is a representation in a modified refleoted binary number system [39] for which
..
pi = 2t(-1)h@**-@#+1,
i
=0
.
~ 1 , . . ,n-1
(2.8)
The Hamming distance between successive representations is two rather than one. The main advantage of the modified system is that multiplication by 2k is accomplished by a left shift of k bits, 2.2 Linear, Weighted Number Systems
I n general, we shall discuss only weighted linear positional number systems and the term system will have this meaning unless otherwise qualified, Garner [20] has shown that for a nonredundant complete, weighted, linear number system to exist, i t is necessary and sufficient that: (1) The product of the cardinality of the digit value sets is equal to the cardinality of Q,the set of interpretations. 134
NUMBER SYSTEMS AND ARITHMETIC
(2) For all i, the digit weights are
hM
ei =i ,
GCD(rni,ki)= 1
(2.9)
5fimj
.
where mj is the cardinality of the set Z j , and Z j = (0, 1, . . , mj-l}; M is the modulus of the number system. A redundant number system is obtained if either of these conditions is not satisfied. If the cardinality of the interpretation set is less than the cardinality of the product of the base sets, then the number system is both complete and redundant. If condition two is violated, then the number system is redundant, and incomplete if condition one is satisfied. These conditions define a very large class of number systems. For example, the cardinality of the set of distinct number systems for an n digit, fixed base, weighted, linear number system is mz4(m), 2 = n(n-1)/2, and 4 is Euler’s function; m is the base of the number system. While the characteristics of the complete class have not been studied in detail, i t appears that the number system with conventional weighting obtains the simplest arithmetic properties. The conventional number system has the property that hi = 1 for all i. If mj (the cardinality of the base set) is chosen such that all pairs of mj are relatively prime, then the class of number systems contains, at one extreme, residue type number systems, and, at the other extreme, is a number system with conventional carry (hi = 1 for all i). Rozenberg [59] has investigated this class of number systems and has concluded that only the conventional number system and the residue number systems are of interest.
2.3 Carry Assimilation The carry or borrow assimilation processes for the class of linear weighted number systems may be studied using a related redundant number system. Assume that the carry or borrow rules are unknown. This is indeed the case when one investigates a new number system. Consider the nonredundant number system N , with digit sets of cardinelity m,, . , ,m,. If digitwise addition is performed, the weight function will continue to provide the correct interpretation modulo M ,but the initial sets of digit values with cardinality m, are no longer adequate. No loss in generality occurs if it is assumed that Q = I;, = (0, 1, , . , bl- 1) (integer interpretation). Then
.
.
nm4=M
(2.10)
i-1
135
HARVEY L. GARNER
We seek a new set of digit values which i s fmite and is closed under addition. The set I;, has this property since for any i, Mp, 0 mod M. 2, is also the smallest set with this property. We may now define a redundant number system N , with the same digit weights aa N,. N , has the property that all x, E I;,. Furthermore, N , is included in N,. The cardinality of N , is &in and every interpretation in ZM is associated with exactly N"- 1 distinct elements of N,. The M" different elements of N , can be arranged in a rectangular array, M x M" - l, so that the leftmost oolumn contains the M elements of N , ordered in increasing magnitude. The array can be arranged so that the M" - entries of the first row are the M"- 1representations congruent zero modulo M.It can be shown that K,the set of representations congruent to zero modulo bl, is a proper normal subgroup of N,. Thus, the array is a coset decomposition of the N,. Each element of N , occurs in exactly one coset and may be considered as the coset representative. The remaining elements of a given coset are redundant representations, due to unassimilated canries, which have the same interpretation as the coset representative. Two elements of N , are in the same coset if and only if they differ by an element in K. The problem of assimilation for N , is conveniently studied by means of the homomorphism between N g and N,, or the isomorphism between N , and the factor group N,/K. The elements of N,/K are the cosets. This approach is due to Arnold [Z]. Arnold has shown that the appropriate algebra for the study of N , and N , is found in module theory. I n particular, the carry structure or the borrow structure of N , can be completely specified in terms of the generators of K. The generators of K provide the transformations required for carry assimilation. The generators of K always form an n x n triangular array. The diagonal elements of these arrays are filled by rn, , , , ,m,, where m, is the cardinality of the ith set of digit values. The generator array for residue number systems contains nonzero elements only on the main diagonal. For a conventional system, the diagond below the main diagonal is filled completely with negative ones (i,e., M-1). See also LeVeque [37l. R m [52] has made some extension of the above concepts for the study of number systems which are redundmt because the cmdinrtlity of N is greater than &. However, the problems of canonical reduction and carry assimilation for redundant number systems require further study. 2.4 Interpretation
Some additional comments on the interpretation problem are appropriate at this time. Computer number systems usually do not 136
NUMBER SYSTEMS AND ARITHMETIC
employ an explicit symbol or marker to denote the separation of integer and fractional weighted digit positions. The position of the point is specified by convention in fixed point representations and the user can, to some degree, modify the convention. Floating point representation employs a fixed point number and an auxiliary number called an exponent. The exponent indicates the direction and number of positions that the point should be moved. Most modern general purpose computers provide for floating point operation. Floating point notation simplifies the scaling problem since fractions and integers over a large range can be easily represented. Arithmetic operations must include exponent calculation, and rtddition or subtraction is permissible only if the two operands have the same exponents. Shifting of one operand relative to the other is required prior to the addition of two operands with different exponent values. Results are usually shifted left, with the appropriate exponent modification, to obtain a nonzero digit in the high order position of the fixed point representation. This process is called normalization or standardization. The resulting fixed point part of the number is said to be in normal or standard form. Normalization may produce results with questionable significance in the low order digits. This problem has been studied in detail by Ashenhurst and Metropolis [I, 441. All computers permit fixed point arithmetic, some permit only fixed point arithmetic. Fixed point notation is a basic part of floating point notation. The discussions which follow in this paper will be concerned with the arithmetic operations for fixed point number representations. Another aspect of the interpretation problem is the representation of positive and negative numbers. Again there is no special plus or minus symbol in the machine representation. The designer must establish an interpretation and a convention which permits the machine number system to represent both positive and negative numbers. Two basio schemes exist. (1) Magnitude plus sign. Normally the high order digit represents the sign. The magnitude and sign computation are separated. Magnitude plus sign coding is natural for the human but unnatural for the machine because special sign computations are required. If x - y is executed in magnitude plus sign code and y > 2, then the result is obtained in complement coded form. ( 2 ) Complement coding. Two types of complement code are in general use. These are the radix complement code and the diminished radix complement code. Complement coded number systems have the property that no special sign computation is required. Thus, in general, computation for complement coded number systems can be obtained
137
HARVEY L. GARNER
with less complexity than that required for magnitude plus sign coded number systems. On the other hand, the complement coded representations are not natural for the user of the machine. The baeis for complement coding is found in the theory of cyclic additive groups of finite order. We give here an abstract presentation of the interpretation problem for machine number systems for both complement and magnitude plus sign coding. Digital computer number systems have the properties of a finite additive group for single length representations. Double length representations of interest in multiplication am also elements of a finite additive group [23].One property of the additive group Q is the exis0 = a, a E a. Another tence of a unique zero element such that a property is the existence of a unique inverse element for every element of the group. If a b = 0, then a is the inverse of b and b is the inverse of a. Thus b can be interpreted ae negative a and a can be interpreted as negative b. Thus every element of the group and every element of the machine number system may have both a negative and a positive interpretation. Closure is the third property of the group. Closure means that if a, b E Q and a b = c, then c E Q. The closure property of the machine number system creates the overflow problem because the machine number system is finite while the number system of the user is infinite. Scaling is the process of interpreting the finite machine number system in the appropriate way to represent a selected set of numbers from the user's number system. An overflow occurs when a representation is needed which is not a member of the selected set. More precisely, a machine number system N having the properties of a finite cyclic additive group is mapped into the set of real numbers. Since the group is cyclic, it can be generated by one additive generator S'(0) E N. The nth successor of zero is defined as AS"(0) E N. Let # N, the cardinality of N, be equal to a. An important identity is P ( 0 ) = 0. The predecessor of zero, P(0)EN, is the nth element preceding zero, and since P ( 0 ) = 0, i t must be the cam that P ( 0 ) = P " ( 0 ) .The map for complement coding is determined by the desired interpretation. The map N --f R must have the following properties:
+
+
+
(1)
o-to
(2) S ( 0 )-+ 0
+ x8
(3) P ( 0 )- t o - y8 (4) m + k + l < # N = a
0
E
R
O,SZ(O), P(0)E N
~8 E R , x y8 E R , y
= =
1,2,...,k 1,2,...,m
Consider two elements of the reels having representation in N; an overflow occurs if the sum, of two elements, does not have a representation in N. 138
NUMBER SYSTEMS AND ARITHMETIC
Let us consider the possible complement coding schemes. I n the first place we may choose 6 > 0 or 6 < 0. The usual choice is t o choose 6 > 0 so that complement coded representations and the magnitude plus sign representation for positive numbers are identical. If m or k equals zero, then a number system representing only numbers of one sign is obtained. I n general, it is desirable to choose m = Ic so that every number has both a positive and a negative representation. Suppose k = m = a - 1. This is a violation of property four. I n this case, every element of N has both a positive and a negative interpretation. This ambiguity causes no arithmetic difficulties if the sign of the result is known. However, this is usually not the case, and therefore property four is essential in order to obtain nonambiguous interpretations with respect to sign. The complement code is called a radix complement code if (0, . . . , 0 ) -+ 0. If 2 I # N . then usually m = k 1. This choice permits sign detection on the basis of the high order digit. For example, in the binary number system, the high order digit conveys the sign information. For a base ten number system, the high order digit contains both sign and magnitude information. Digit values 0 , 1, 2, 3, 4 are associated with one sign value and digit values 6, 6, 7, 8, 9 with the other sign value. The 1 if 2 I # N also permits a simple detection scheme choice of m = k for additive overflow. Overflow occurs if and only if the addition of two numbers with the same sign interpretation produces a result with the opposite sign interpretation. The addition of two numbers with opposite sign interpretation cannot produce an overflow. A diminished radix complement coded number system is obtained if ( b - 1, . . . , b - 1) -+ 0, where b is the base of the number system. The diminished radix complement coded system is unusual because (0, . . . , 0 )is not an element of this system. The complement coded number system is defined without (0, . . . , 0 ) ,but in order to obtain simple addition properties, the complement coded arithmetic is executed in a number system which includes (0, . . . , 0 ) and a correction is used when needed. Addition may be viewed as enumeration using the successor concept. Let N , = N - ( 0 , . . . , 0); # N = a,# N , = a - 1. For S’(0) E N , and Sb(0) E N,, we have Sa(0) Sb(0) = S’(0) where c = I a b I a = a+ b - ta butS’(0) E N . It is obvious that a correction is needed when t # 0 because ( 0 , . . . , 0 ) has been counted. This condition is easily recognized in practice. Addition for an n digit 1 digit position whennumber system produces a carry in the n ever t # 0 (i.e., c,,+~ = 1). The required correction is the addition of one in the low order position since (0, . . . , 0 ) should not have been enumerated. Hence the term “end around carry correction.” If 2 I a and k = m, then the machine number system has one zero 139
+
+
+
+
+
HARVEY L. GARNER
element, (./a) - 1 elements with negative interpretation, and (a/2)- 1 elements with positive interpretation. End around carry correction is always required if two elements of the set P ( 0 ) . P ( 0 ) are added together. Consider P ( 0 ) Si(0), 0 <j < ( a / 2 ) - 1, 0 Ii b the difference is negative and appears in radix complement coded form. This demonstrates again the naturalness of complement coding to machine arithmetic. In a fixed point system it is assumed that all elements of the machine number system N have the same interpretation. If this is not the case then there must exist some explicit notation for the proper interpretation. A number system with this property is classified as floating point. The degree to which the machine designer prevents the use of multiple or variable interpretation, implicitly determined by the user, is revealed in the following analysis of the problem of interpretation in fixed point arithmetic systems. Obviously, the user can assign any interpretation to the number system for addition since in the absence of an overflow S ( 0 ) +a8
(2.12)
S*(O)+ b 8
(2.13)
P(0)
+ S*(O)+-a8 + b8
=
(a
+ b)S
(2.14)
The situation is somewhat different for multiplication. Normally a double length product is obtained by multiplying two single length representations. We can study multiplication by extending N, the single length number system, to obtain N,, the double length number 140
NUMBER SYSTEMS AND ARITHMETIC
system. # N = CL and # N , = a,. This is a natural extension since N , is the set of product representations obtained by the multiplication of two operands from N, and N can be embedded in N,. The multiplication process can always be obtained in the machine by a sequence of additions. N, is also an additive group. This property can be used to study complement coded multiplication. However, we are concerned at the moment only with the question of scaling for the operation of multiplication, and we shall not pursue the question of complemented coded multiplication. Let Sa(0),Sb(0)E N, then since multiplication can be obtained by addition, we have
X“(O)Sb(o)= P ( 0 ) -+ abS,
Sab(0) EN,
but the correct product is abP, so a corrective multiplication by 6 is required. Thus, the elements of N, must be given the interpretation S”b(0)+ a b P
There exists a problem of compatibility between N and N,, since, in general, N f N,. Incompatibility, in the case ofthe conventional fixed point, weighted, fixed base number system appears because single length operands produce double length products. Either the double length product is approximated by a single length representation or the subsequent computation must be executed in a double precision mode. A product in N, may be approximated by a representation in N. The approximation is not valid if overflow or underflow occurs. If S“(0) E N, then S’(0) + zS2 = (z8)S. Consider Sz”(0).If zS 2 # N then S‘’ (0) $ N and an overflow condition exists. If xS < 1 then an underflow condition exists. Overflow occurs only for 6 2 1 and underflow occurs only for 6 < 1. If 1 < zS < # N then S[2a1(0)E N approximates S’(0) E N,. Let [xS], = [zS] if zS - [zS] < 4, otherwise [zS], = [zS] 1. Then S[”lR(O) E N is the rounded product. S[z”l(0) E N is readily obtained from S’(0) E N, for fixed base b number systems if 6 = b-,; for integer values of k. In this case S“(0) E N is an n digit representation and S’(0) E N, is a 2n digit representation. Let S’(0) = (a,,, a,,-,, . . . , a,,,, a,, a,-,, . . . , a,) E N , and S[z’l(0)= (b,, . . . , b,) E N. Then bi = a,, for i = 1, . . . , n if k i = 1, . . . , 2n, otherwise b, = 0. Notice if 6 = b-” then Sz”l(0) = (a,,, . . . , a,,,) and if 6 = 1 then k = 0 and S[z”’(0)= (a,, , . . ,a,). Notice that A!5“zb1(0)= 0 if 2n I k or k 5 - n and only when 0 k, n are some bi not always equal to zero. Thus for the conventional fixed point number system the user’s interpretation of the machine number system relative to multiplication is restricted because of compatibility, overflow, and underflow considerations. The interpretations S = b-,, k = 0, 1, . . . , n are preferred.
+
+
141
HARVEY L. GARNER
The machine designer usually incorporates instructions favoring a given interpretation (i.e., the low order product instruction is consistent with 6 = 1 while the high order product is consistent with 6 = b-"). Given a dividend represented by S'(0) E N and a divisor represented by S ( 0 ) E N, a fixed point division algorithm obtains Sq(0) E N and S'(0). Sz(0),SY(O), and tP(0) have the same interpretation. Division algorithms are iterative and the precision of Sq'(0)which approximates S ( 0 )is improved at each iteration by an incremental correction, Sqk(0). Thus the interpretation of N, the number system containing the product representations of the form Sqk(0)lP(O)= k W ( O ) , must be considered in specifying the iterative computation. In particular, the requirement that S ( 0 )should have the same interpretation as P ( 0 ) and SY(0) necessitates the consideration of the compatibility of interpretation between N , and N. Consider the specific case of the conventional iterative division algorithm for a fixed bme, n digit, weighted, number system. For N let 6 = b-', then a ( 0 ) = (al, . . . , qn) E N and 8(0) --+ q l P k - l . . . + q,,b-'. (The ordering of the subscript from left to right is contrary to the general notation used in this paper but is used for quotient representations, obtained by the conventional algorithm, to emphasis the order in which the quotient digits are obtained.) If ql is to have the correct weight then at the first iteration the machine must perform a calculation representing
+
(2.15)
where S'(0) -+ yb-' IXJ
and =
=
d
1, is given by
8' = S'-'
@
A"1
2[(@-1
81=
A' 0 A%
C'
i
= 2,3,.
..
A&')@-' v @-1A"+l]
Q =
@
@ @',
= 2(A1AB)
(3.10) (3.11) (3.12) (3.13)
This basic carry storage scheme has been modified somewhat in ILLIAC 11so that carries initiated by the conjunction of @-l and A"+'are never stored in the carry storage register but are assimilated immediately. (This modification is discussed in Section 4.) 3.2 Carry Statistics and End of Carry Detection
The statistics of the carry generation and propagation process are of particular interest since the determination of the end of carry propagation is one technique which may be used to decrease the average addition time. Note that if carry storage is employed, the end of carry propagation condition occurs when the carry register contains all zeros, This condition is readily detected by an n-input AND gate. An alternate scheme to be employed when carry storage is not available was proposed by Gilchrist, Pomerene, and Wong [25].In this scheme two ripple carry chains are employed. The conventional ripple carry chain is augmented by an auxiliary carry chain. An auxiliary carry di is initiated in position i when &l&-l = 1 where ui-' and bt1 are the ith - 1 positions of the two operands. The auxiliary carry di is propagated by the condition airi = 1. It is apparent that when carry propagation has been completed there will exist a "one" in every digit position of either the carry representation or the auxiliary carry representation. This condition is eaaily detected. If all digits of both operands are independent and the digit values 0 or 1 are equally probable, then the probability for carry initiation at any digit position is one-fourth. The average length of carry propaga148
NUMBER SYSTEMS AND ARITHMETIC
tion has an upper limit of two digits. This figure does not include the carry initiation. Thus the upper limit for the average length of the carry sequence is 3.0 digits. In a given addition several different carry sequences may exist. The addition process cannot be completed until the longest carry has been propagated. Therefore it is not the average carry length which is important for the end of carry detection, but, rather, the average maximum carry length. Burks et al. [8] have shown that the upper bound on the average maximum length of carry for the addition of two operands is given by log,n. The maximum average length of carry for n = 40, the operand length in the Princeton machine, was given as 4.62. The formula for calculating the maximum average length is given, although this formula is in error. I n particular (see page 10 at the end of the third paragraph in Burks et al. [a], the formula for P,(v) should read
P,(v)
=
P,-lW
+ E l - P,-"1/2w'
(3.14)
Gilchrist et al. [25] used simulation to determine that the maximum average length of carries, when both the conventional carry and the auxiliary carry are considered, is approximately 6.6 for a 40-bit operand. The actual length is close to 6.69. Reitwiesner [54] developed. the probabilistic equations for this type of carry completion circuit and provided results for 2 5 n 2 39. If carry storage is employed, then the end of carry is easily detected without the auxiliary carry. As we have indicated above, one of the important advantages of the carry storage scheme is that a new operand can be introduced at each step. The statistics of the carry after the introduction of the last operand were studied by Estrin, Gilchrist, and Pomerene [ l a ]and shown to be independent of the number of operands introduced. This means that it is possible to construct a high speed multiplication circuit in which a partial product and a partial carry representation are obtained in n or less addition steps. Complete msimilation of the carries obtains the final product. On the average less than log,n additional steps are required for the complete assimilation of the carries. 3.3 Improved Ripple Carry Circuitry
The standard realization of the ripple carry circuit is a chain of alternating AND and OR gates. Improved performance can be obtained using different circuit configurations. Improvement of this type is distinguished from improvement obtained by changes in the logical organization of the carry structure. Both examples which follow are basically ripple carry logic. 149
HARVEY L. GARNER
3.3.1 Exclusive OR Carry Logic
Exclusive OR carry logic is not new since this concept has been used in arithmetic units using relays. The equations for the exclusive OR carry are the same as those given for the ripple carry. However, the hardware implementation is different. Three switches are required per stage. A switch connects ci to c ~ + The ~ . switch is closed if and only if ri = a, 0 bi = 1. The second switch clamps c,+~to the “one” voltage level and is closed if and only if ki = a$, = 1. The third switch clamps ci+l to the “zero” level and is closed if and only if Zi6{ = 1. The carry chain has only one logical element per stage rather than the two required for the AND, OR realization. Kilburn et al. [30, 311 and also Salter [60] have proposed a circuit using saturated transistors to realize the required switches. Using a type SB-240 transistor, the carry logic for 20 stages operates on an 80nsec cycle. Only 20 nsec of this time is required for the propagation of the maximum length carry. The remaining 60 npsec are required to switch the transistors in and out of saturation. It is expected that the carry propagation could be cut to about 10 nsec if the length of wire in the carry chain were to be reduced. This circuit is characterized by a propagation of carries with a velocity of about one-fourth the speed of light. 3.3.2 Threshold Carry Logic
Equation (3.4) defines the logic of the ripple catry. This equation can be interpreted appropriately for threshold logic as follows: ci is a “one” if and only if two or more of the variables a,, b,, c, have values equal to one. A tunnel diode is extremely fast and can be used as a threshold device providing a “one” output when two or more of the three inputs are in the one state. Sear [61] and Daly and Kruy [I31 describe a ripple carry circuit using tunnel diodes as threshold devices. A propagation delay of 2.2 nsec per stage is claimed. 3.4 Logical Organization for Fast Addition
The adders considered in this section employ different logical techniques to obtain fast addition from those discussed previously. 3.4. I Factorization of the Simultaneous Logic
Various logical configurations requiring more than two logical levels may be obtained if auxiliary carry functions are defined. This approach overcomes fan-in and fan-out limitations imposed by physical switching 150
NUMBER SYSTEMS AND ARITHMETIC
circuits at the cost of added logic depth. An order of auxiliary functions may be defined. Each order of auxiliary functions adds a logical depth of two units. The particular auxiliary function scheme used by Weinberger and Smith [74]is a typical example. Let c{+,, = ciri . . . ~ i + ~v- kiri+1 l . . ~ i + ~v- l . v ki+a-gri+a-l
-
v ki+a-1
(3.16)
Two types of first level auxiliary function are defined: Type (1) ?-/ik(j+l)b-l
is defined for j = 0, 1,
,
- ri+bj
-
*
(3.16)
ri+(j+l)b-l
. . , such that
i < i + ( j + l)b - 1 < i + u -
1
0 3. The extended digit number system does have a unique representation for zero and has the further advantage that no input conversion is required as is the case for signed digit representation. Extended digit 162
NUMBER SYSTEMS AND ARITHMETIC
arithmetic for both direct subtraction or complement coded subtraction is dependent upon the reduction of extended digit representations to conventional nonredundant representation in order to determine sign. I n other words, unassimilated carries which are stored in the sum digit may change the sign digit'. Chamberlin considers only a binary sign digit. There is no reason for not using a multivalued sign digit. This digit then serves as an indicator (as discussed in Section 4.1). If an indicator digit is employed, then both positive and negative overflow can be determined for most indicator digit values. Conditional indicator values would require conversion to conventional form to determine overflow. A similar conversion would be required to determine sign. The advantage obtained follows from the fact that many basic arithmetic processes consisting of additions and subtraction can be controlled by indicator status rather than sign status. 5. Multiplication
The most significant recent advances in machine multiplication are direct consequences of the concept of signed digit multiplier coding. The signed digit code provides a means for reducing the number of add type operations required for multiplication and increasing the average shift length. 5.1 Multiplier Coding The use of the signed digit code to improve the multiplication process is not new and has been used extensively on desk calculators. Recent requirements for high speed multiplication have forced the machine designer to use this technique. The studies of Tocher [?'I], Lehman [34], and Smith and Weinberger [64] are of particular interest. The additional logic required for multiplier coding in a parallel arithmetic unit is trivial. The following identity is basic to multiplier coding: 2kfn31
- 2 k = 2k+n
+ 2k+n-1 + . . . + 2k.
(5.1)
The identity indicates the possibility of replacing a sequence of add and shift operations in multiplication by a subtraction and an addition. Coding may be performed sequentially starting from either the high order or the low order digit positions. Only coding starting a t the low order digit position is considered in this paper. A sequence of n digits may be coded in one step as a function of n 1 digits. The one bit per step transformation of the binary number A to the signed digit coded number B is defined by a( + bi for i = 1, . . , n using the rules given in Table I.
+ .
163
HARVEY L. GARNER
TABLEI R m s FOR CONVER~IONBINARYTO CANONIUAL SIUNEDDIUITCODE
0 0 1 -1
1 -1 0 0
Examplee; (1)
110111010
=
1ooi oo io 1o (2) 0010011100
=
ooi o iooioo where 7 A - 1. The rules given in Table I produce a canonical signed digit coding with the property that every pair of digits with unit magnitude is separated by at least one zero. The canonical coding also has the minimal possible number of nonzero digits. Reitwiesner [53]has proved the existence of a canonical signed digit representation for each binary representation. The statistics of the canonical signed digit code and the binary code are important t o the machine designer. The probability of a “one digit” is one-half, and the expected number of zeros between “one digits” is one for the binary code. The probability of a “one digit” with either sign is one-third and the expected number of zero0 between digits of unit magnitude is two for the canonical signed digit code. Let ps(v) denote the probability that a pair of unit magnitude digits is separated by v zeros. For the binary code pa(v)= 2-”-l, v = 0, 1, . . , and for the canonical signed digit codeps(0) = 0 andp,(v) = 2-”, v = 1 2, . . .
.
5.2 Multiplier Logic
The multiplication of two n bit operands can be accomplished using a parallel adder with a right shifting accumulator. Multiplier digits are 164
NUMBER SYSTEMS AND ARITHMETIC
examined in sequence beginning with the low order position. If the multiplier digit is a one, the multiplicand is added to the contents of the accumulator and a right shift of one digit position is executed. If the multiplier digit is a zero, then zero is added to the accumulator and a right shift is executed. Thus n additions and n shifts are required. If the addition operation is omitted for zero valued multiplier digits, then, on the average, only n/2 additions will be required, since the probability of a one is one-half. If the multiplier is coded in the canonical sign digit form, then the number of additions or subtractions is, on the average, equal to n/3. Subtraction is now required but this is no problem since subtraction is available and requires the same time as addition. When the multiplier is expressed in the signed digit code, the partial products in the accumulator appear in two’s complement code. It is necessary to fill in the sign digit after the right shift. The shift does not change the sign. The sign digit is filled with the value existing prior to the shift. The statistical results suggest further refinements in the design of the multiplier. A sequence of v zeros between two digits of unit magni1 digit position shift. Special shift circuits must be tude permits a v added to the logic to obtain the available reduction in the total number of shifts required. If logic were provided to obtain all possible shift lengths in one step, then the average shift length for the uncoded multiplier is two digits and the average shift length for the canonical signed digit coded multiplier is three digits. An average shift length of 1 3 is obtained for the uncoded multiplier using logic which permits single as well as two digit shifts. If three digit shifts are also permitted the average shift length is If. Single and double length shifting for a multiplier in the canonical signed digit code obtains an average shift length of 14 digits. Suppose that the multiplier digits are coded and that all shifts are two digits in length. This is essentially base four arithmetic. The multiplicand and two times the multiplicand must be available. This multiplication requires, on the average, n/3 additions or substractions and exactly n/2 shifts. Base eight arithmetic can be used to reduce the number of shifts required to n/3. Each shift is exactly three digits in length and multiplicand multiples of 1, 2, 3, and 4 must be provided. Only multiplicand multiples of 1, 2, 3 , and 4 are required since signed digit code representation is used. The average number of add-like operations is less than n/3, on the average. The various schemes for multiplier logic are summarized in Table 11. Carry propagation has not been considered. It is possible to obtain further decreases in the time required for multiplication if the sequence of multiplicand-partial product additions can be executed before the 165
+
HARVEY L. GARNER
TABLEI1 DIFFERENT MULTIPLIER CONBIaURATIONS
COMPARISON OB
Additions Standard multiplier Skip zero add Skip zero add single and double shift Skip zero add single, double, and triple shift Skip zero add ell possible shifts
Average shift length
n
Coded multiplier Skip zero add single and double shift Skip zero add all possible shifts Double shift only Triple shift only
n/2 eve
1 1
n/2 ave
It
nl2 ave
14
n/2 ave
2
n/3 ave
19
n/3 ave n/3 eve < n/3 ave
3
2 3
carry assimilation has been completed. Carry storage and additional adders can be used since it is known that it is only necessary to allow the carries to propagate one position between additions. Notice that, as a result of the one digit position right shift of the accumulator, it is not necessary to propagate carries relative to the adder logic. In particular, the adder logic for single shift multiplication is
S,i
ci
(as defined below)
=
t(Si)*
-
i(P-1@ p
=
(Pi-' @ AGl)@-1 "Si-lAifl.
- 1
@
Ci-l)*
The addition involves only n digits, hence if Si
si = t(si)* = (S,,, S,,,
a,,-,,
(6.2)
= ( s ~s,,-~, ,
.. . ,
(5.3)
. .. ,a1), then
S2).
A similar situation exists for the double-shift-only logic or the tripleshift-only logic if modulo four or modulo eight carry logic is used, Multiplication schemes using multiple shift lengths require additional logic to shift the carries. This oomplexity must be considered against the complexity required for the generation of the multiplicand multiples needed when the multiplier logic has only a single multidigit shift. Other multiplier configurations are presented and evaluated by MacSorley [all. 166
NUMBER SYSTEMS AND ARITHMETIC
5.3 Multiplication for Complement Coded Operands
Multiplication is normally executed in a digital machine for operands expressed in either the magnitude plus sign code or in the two’s complement code. Multiplication for one’s complement coded operands has the characteristic disadvantage that end around carries may be propagated a t any step in the multiplication process. The assimilation of end around carries can be accomplished by using a double length arithmetic unit, or the carries may be accumulated and added to the low order product at the end of the multiplication cycle. Early algorithms for two’s complement multiplication [8,581 were also characterized by the need for multiplicative corrections either before or after the main multiplication cycle, Complement coded multiplication using Booth’s [7] method requires no corrections before or after the main multiplication cycle. It is not necessary t o know the sign of either of the operands and the product appears in the correct two’s complement form. Booth’s method is the same as ordinary multiplication except that the multiplier is coded using the signed digit code. A model provided by Garner [23]can be used in the study of complement coded multiplication. 5.4 Nonstandard Multiplication Logic
I n any cyclic multiplicative group every nonzero element can be expressed as a power of a generator of the group. Groups of prime order, p , are cyclic and every element of the group has the property: up =
(5.4)
1.
Furthermore, any element other than the identity is a generator of the group. Thus, for a, b, g E a: a = g*a (5.5)
b = gib where i, is called the index. Obviously, ab iab = l i a + i b l p
(5.6) =
giaband (5.7)
Thus multiplication is accomplished by the modulo p addition of indices. This type of multiplication has been studied for Mersenne primes by A. Fraenkel [18]. I n general, the characteristics of the conversion process required between standard binary and index notation cancel the inherent advantages of this scheme. Mitchell [as] has given an algorithm for approximating the base two logarithm of a binary number. The characteristic of the logarithm is equal to the base two logarithm of the weight of the most significant 167
HARVEY L. GARNER
digit. If digit positions are numbered 0, 1, 2, . . . to the left of the point and -1, -2, . . . to the right, then the digit position of the most significant digit equals the characteristic. The binary number excluding the most significant digit is the approximation for the fractional part of the logarithm. Example8 ; lOg~(OO101.) 10.01 10g,(01000.)
=
11.000
l ~ ~ ~ ( O l 1 1 1 .11.111. ) The algorithm yields results with no errors if n = 2’ for integer values of k. Straight line interpolation is obtained between these values of n. The absolute error in the logarithm is less than 0.086. The algorithm for obtaining the inverse logarithm is obvious. Multiplication and division operations using the logarithmic approximations result in errors as large as -11.1% and 12.5%, respectively. 6. Division
Ideally the division x/d = q should require no more additions or subtractions than the multiplication x = dq where d is coded in canonical signed digit code. In other words, division should be the exact inverse of multiplication. The machine division process has three parts: initialization or standardization, quotient generation, and remainder determination. In this section we consider only the problem of quotient generation, Appropriate initialization to obtain x,, as defined in Section 2 is assumed. 6.1 Nonrestoring and Restoring Division
In order to simplify the discussion it will be assumed that both the dividend and the divisor are positive numbers. For the binary case, quotient generation by the restoring division method is described by : where
x,+~ = 2x, - q,+&, j = 0, 1 , . . .,n - 1 2 4 = partial dividend at the start of the j t h step Xj+I = partial remainder after the j t h step x o = dividend x,, = remainder (final) d = divisor
Q 168
=
(ql,.
. .,q,,) = quotient.
(6.1)
NUMBER SYSTEMS AND ARITHMETIC
Here qj is selected so that d > xj+l 2 0. It follows that qj+l E (0, 1} if xo < d. If the condition xo < d is not satisfied, then a larger set of quotient values is required. This is not desirable. A t each step, x;+l = 2xj - d (6.2) is obtained. If x;+, 2 0, then qj+l = 1 and xj+l = xi+l.If x;+, < 0, then qj+l = 0 and restoration is required:
+d
xj+1 = ~ ; + 1
After n steps, Xn
=
xn2-k
=
+ . . . q,)d + . . . + 2-kqn)d.
2”x0 - (2”-lq1 x02n-k - (2-”-‘-’q1
(6.3) (6.4) (6.6)
Thus restoring division requires n subtractions, n one-digit position shifts, and m additions. If all possible quotients are equally probable, then m = n/2 since restoration is required whenever qj+l = 0. The division algorithm is dependent on the comparison of the sign of xi+1. Exact sign determination requires complete assimilation of all of the carries of the partial remainder. Nonrestoring division eliminates the restoration step. Equation (6.1) defines the recursive process but qj+l is selected such that I xj+l I < d. If xo < d, then qj+, E { - 1, l}. So at each step the divisor is either added or subtracted from the partial dividend. The divisor is subtracted when 2xj > 0 and added when 2xj < 0. If 2xj = 0, the process may be terminated if this condition can be detected. The resulting quotient is expressed in a signed digit code. This particular signed digit code is neither canonical nor minimal and is maximal with respect to thenumber of one digits. Nonrestoring binary division requires n additions or subtractions, n single-digit shifts, and precise sign determination. The type of chart shown in Fig. 2 is due to Robertson [56]. On this chart the y axis represents the values of x ~ +The ~ . x axis represents the values for 2xj. If d > xo, then -d < xj+l < d and -2d < 2xj < 2d and qj+l E {-1, l}. The line 2 5 - d = xj+l is designated qj+l = 1, since qj+l = 1, if 0 < 2xj < 2d and the remainder is The line 2xj + d = xj+lis designated qj+l = - 1, since this is the correct quotient value for -2d < 2xj < 0, and the remainder is x ~ +Two ~ . examples of the relationship between x ~ +2xj, ~ , and qj+l are shown by the dotted lines in the second and fourth quadrants. Together, the two examples completely characterize the division of Qd by d. If xo = i d , then 2x0 = &€; q1 = 1 and x1 = - i d . For the second step 22, = -&€, qp = -l,andx, = +d.Forthethirdstep2xa = #d,q, = l,andx, = i d . This continuesforj = 4 , . . . ,n - 1. 169
HARVEY L. GARNER
FIU.2. Binary nonrestoring division.
The chart also shows the need for accurate sign determination in order to specify the correct quotient digit. The basic division process can be easily generalized for fixed base number systems with base r . For restoring division j = 0 , 1, . . . , n - 1 xj+l = rxj - qj+&, (6.6) < d. If x o < d, then where qi+l is selected such that 0 S qj+l E (0, 1 , .
. . , r - l}.
For base T nonrestoring division, Eq. (6.7) defines the recursive process and qj+l is selected such that -d < I xj+l I < d. If zo < d, then: qj+l € { - r 1,. . . , - l , l , . . . , r - l}. One might suspect that the set of quotient digit values for base r nonrestoring division is redundant. This is indeed the case. Even digit values can be removed is 2 % r . If 2 % r , then the quotient set qj+l € { - r 1, -r 3 , . . . , - 2 , 0 , 2 , . * , T - 1) is sufficient. This can be seen by studying and extending the chart given in Fig. 3. Because of the redundancy in the set of quotient values, there is always two quotient choices except for -d < rxo < d, rxo > (-r l)d, and rxo > ( r - 1)d.
+
+
+
.
+
6.2 Generalized Nonrestoring Division
Let the division process be defined by Eq. (6.7) and consider the quotient set qj+1 € { - - P 1 , . . , , - l , O , + 1 , . * . , r - 1). The effects of the degree of redundancy in the quotient digit set has been studied in detail by Robertson [56].
+
170
NUMBER SYSTEMS AND ARITHMETIC
Smaller sets of quotient digits may be used if the range rxj is limited. Let I rxj I max = krd where 0 < k I 1. Then -krd I rxj I krd and -kd I xj+l 2 kd. I n particular, if x o I kd then k 2 x,/d = q. The condition q 5 k does not restrict the division process to problems for which the quotient is less than or equal to k. It does dictate that scaling will be used. Given 1 > q = xo/d > k, if x o is shifted one digit position to the right, then q’ = x(r)-l/d < k. The machine obtains q’ and converts to q since q’r = q. In general, the division techniques discussed in this section are most easily implemented in systems using floating point representation. I n such a system the representation of d is always standardized and xo is shifted to scale q. Reference to Fig. 3 will show
FIU.3. Nonrestoring division bam 4.
that k 2 4. If k < 4, then there exists values of rxi for which no value of qj+l exists which will keep kd 4 xj+l < kd. It is desirable to select only those values of k for which the horizontal line representing the upper bound of xj+l and the vertical line representing the upper bound of rxj intersect the line xj+l = rxj - fd. Then kd = rkd - f d so
Since k 2 +,it follows that r-1
f>-.
Adivision process is specified iff and r are given, The minimal quotient is the set of integers { -f, . . . , - 1, 0, 1, . . , ,f }. Notice that the range of rxj covered by a given qj+l overlaps the range covered by qj+l 1 and qj+l - 1 unless k = 4. A given qj+l may be selected as the quotient digit
+
171
HARVEY L. GARNER
+
if qj+,d - kd < xj 5 qj++l kd. Let H be the magnitude of the overlap in the values of rxj between two succeesive values of qj+l:
Substituting k from Eq. (6.7) yields
H
=
a r(- 12
- 1).
(6.10)
Truncated dividend and divisor representations are used to speed up the quotient determination process. The truncated dividend consists of the t high order digits. Complete carry aesimilation is executed only over the t high order digits of the truncated representation. The truncated representation serves as a multi base indicator digit, Also, since the divisor is normally in standard form, it is advantageous to compare the partial dividend against predetermined constants rather than the divisor proper. The above schemes are used only in the process of the quotient determination. The partial remainder calculation must use the nontruncated dividend and divisor representations. Robertson [56] has developed a formula for edimating the precision required for quotient determination. Let
a<xjn
FIG.5 . Flow diagram for modified dividers. Initially ( A ) represents y and ( B ) represents x. The pseudoquotient is obtained in &. This routine is used for (1) division, (2) Part 1 of log[l (y/x)] calculation, (3) Part 1 of tan-'(y/z) calculation, and (4) calculation.
v%
+
183
HARVEY L. GARNER
divide branch is followed, then the flow diagram for conventional decimal restoring division is obtained. The term pseudo division is due to the facility for modifying the divisor by the addition of ( M ) ,the content of a special modification register. Modification occurs after each permissible subtraction of the divisor from the partial dividend. No modification occurs for the restoration step. The different algorithms are characterized by the various operands or constants used for the modification constant, N. The algorithm for log(1 y/x) is a typical example of the pseudo multiplication and division processes. The basic method is due to Briggs, and requires the determination of digits qj such that:
+
y
+x =x
Given qj,j = 0, . . . ,n, then log(1
( +3
log 1
-
=
+
n
1-0
(1
+ lo-j)?.
(8.1)
+ y/x) is obtained from 2 q j log(1 + 10-j). ,:o
The values for log(1 10-j) are stored. The computation required to obtain the sequence of qj is basically an iterative process which is obtained by a pseudo division. The digits qo, . . . , q,, are generated sequentially. Assume that digits qo, . . , qj-l have been determined. Let (a) be the trial value of qj and
.
j-1
(1
+ lo-')%
1
(1
+ 1O-j)a - 1
(8.3)
Then qj = a, 0 5 a, < 10, and a, is chosen to yield the smallest positive y.: As in conventional machine division, a, may be determined by an examination of ya for the sequence a = 0, 1, . . . , 9. It is thus desirable to express y:+l in terms of yi as follows:
y:+l
=
y,j -
lo-'$:
(8.4)
+
xoj lo+:. (8.5) As in conventional division the balance y:+l is reduced by the computation and the scaling required to maintain accuracy is obtained by the substitution =
2:
=
y2101.
(8.6)
The iterative process for the determination of qj is then defined by
184
'-
z:+l
= za
2:+1
=
:x
j
+ lO--'x$
NUMBER SYSTEMS AND ARITHMETIC
Clearly, Yl+l =
Yjp,
xi+l
=
%,f'
zl.1
=
lOZj,.
and therefore
The process is completely defined by the addition of the initial conditions : 2," = y (8.11) xo" =x.
(8.12)
The difference between the pseudo division and ordinary division is due primarily to Eqs. (8.5) and (8.9). If these are modified so that
=x,"+x xa.1
=
(8.13)
x
(8.14)
then Eq. (8.7) defines ordinary restoring division for y/x. Meggitt [42] has studied the requirements of register length, computation time, and computational precision obtained using pseudo multiplication or division processes. These studies were conducted for decimal arithmetic. The techniques, however, are by no means limited to decimal arithmetic. The studies indicate that the input registers in the arithmetic unit normally consisting of n decimal digits must be extended to n + 2 decimal digits. A requirement for 2n 1 decimal digit accumulator exists for some algorithms. This is not a serious problem since accumulator registers are normally double length. The functions log(1 + y/x), tan-l(y/x), and xer can be computed in essentially the time required to execute three decimal multiplications. The computation for tan y requires a time equivalent to four multiplications. The square root algorithm is the conventional algorithm but is included in Meggitt's paper because it is another example of pseudo division. Meggitt suggests that sin B and cos 6 should be obtained using the square root:
+
sin 0
=
cos e
=
(8.15)
JYa;
ya'
(8.16)
The precision obtained by the various algorithms is impressive. The errors are essentially due to round-off and since round-off errors tend 185
HARVEY L. GARNER
to compensate, it is usually the case that the last digit computed has no error. Maximum possible error can be bounded and these results are given in Meggitt's paper. All too often the power of a given computer is measured exclusively in terms of the performance for basic arithmetic operations. Meggitt has shown how relatively small modifications in the basic arithmetic logic can provide significant increases in the computation rate, not because the subroutine is executed faster, but because the subroutine is no longer required. 8.2 The CORDIC Trigonometric Computing Technique
CORDICis the acronym for a special purpose digital domputer used for rotation and vectoring. The basic technique is due to Volder [73]. In the rotation mode, solutions are obtained for
+ x sin 8)
(8.17)
xf = k (xcos 0 - y sin 8).
(8.18)
yf
=
k (y cos 8
Vectoring obtains the solutions for v
=
k d x a + ya
(8.19)
0
=
tan-ly/x.
(8.20)
The computational process for vectoring is essentially the inverse of the process used for rotation. The CORDIC technique is not an incremental technique. Incremental techniques are basic to the operation of digital differential analyzers. The basis for the CORDIC technique is found in the well-known identities: sin(8 do) = sin 8 cos d8 cos 8 sin d8 (8.21)
+ + cos(8 + do) = cos 8 cos d8 - sin 8 sin 40.
(8.22)
These identities also form the basis for the well-known incremental algorithm for the computation of the sine and cosine. Usually A 8 is small and the approximations cos A 8 = 1 and sin 8 = A0 are employed. It is desirable in those cases where d0 is constant to choose A 8 such that sin d8 = T - for ~ base T arithmetic. Multiplication by sin d8 is then obtained by a simple right shift of m digits. The iteration formula for small d8 is:
+ dOvj = sin(8 + do), v)+~ = vj - de uj = cos(e + de), uj+l = uj 186
u,, = sin 8,
(8.23)
cos 8,.
(8.24)
vo
=
NUMBER SYSTEMS AND ARITHMETIC
We now continue the development of the CORDICtechnique. Equations (8.21) and (8.22) are divided by COB Ad to obtain sin(d
")
=
sin d
+ cos 0, tan Ad
(8.26)
'9
=
cos 8 - sin 0, tan Ad.
(8.26)
Ad
COB
cOs(e 4cos Ad
This suggests the iteration:
tj+l
= -%K-= uj
cos A d
+ vj tan Adj
for j
=
0, 1 , .
..
(8.27)
and
-
wi'l
-
"+l
co,' Adj
=
vj - uj tan Adj
(8.28)
j+l
sin do,
u,
=
vo
= COB
uj+, = sin
vj+,
B,,
=
(8.29)
+ 2 AS,)
cos( 6,
(8.30)
t-1
j+l
d
The choice of Ad,
=
=
C Adi. i-1
(8.31)
f 9 0 is required t o obtain va
C Adi > - 180. i=l
180" 2
A minor complication follows since tan 90" avoided by redefining t, and wl:
=
00.
+ v o sin Ad,
t, = u, = u, cos
Ad,
w, = v1
AO, - u, sin Ad,
= v o 00s
(8.32)
This complication is
= =
(8.33)
f vo
(8.34)
uo
and tj+l and wj+,are defined by Eqs. (8.27) and (8.28) for j After n iterations
=
1,
. . . ,n. (8.36) (8.36)
k
=
~ C O Adi S
.
(8.37)
1-l
1 87
HARVEY L. GARNER
Thus the nth iteration yields sin(8 + 8,) and cos(8 corrective factor if
+ 8,) except for a (8.38)
The corrective factor lc is a constant if n is a constant. Thus the sequence represented by Eq. (8.38) must always contain n terms to avoid the necessity of having more than one correction constant. A different statement of this restriction is that for all 8 the computation must consist of exactly n iterations. The sign of Adi has no effect on the corrective constant since the cosine is an even function. The multiplication by tan A Bi for i > 1 is obtained by a right shift of i - 1 digits, if (for binary arithmetic) A8, is such that tan Alli = 2-'+3. If 48, = f 90" and Ad, = f ta11-~2-'+~for i = 2, , . . , n, then the series represented by 8.38 can represent any angle between +180 and -180 with an error less than A 8,. For this set of A B,, (8.39)
The ooding of the angle 8 provides an additional complication. For the CORDICoperation it would be possible to use a representation A, for 8 consisting of n bits having the property: ai = 0
if
Adi 2 0
=l
if
A8,