Table Of ContentFUNDAMENTALS OF
COMPUTER
ORGANIZATION AND
ARCHITECTURE
Mostafa Abd-El-Barr
KingFahd University ofPetroleum&Minerals (KFUPM)
Hesham El-Rewini
Southern Methodist University
A JOHN WILEY & SONS, INC PUBLICATION
FUNDAMENTALS OF
COMPUTER ORGANIZATION AND
ARCHITECTURE
WILEY SERIES ONPARALLEL ANDDISTRIBUTEDCOMPUTING
SERIES EDITOR: AlbertY.Zomaya
Parallel &Distributed SimulationSystems / RichardFujimoto
Surviving theDesign ofMicroprocessor and Multimicroprocessor Systems:
Lessons Learned / Veljko Milutinovic
Mobile Processing in Distributedand Open Environments / PeterSapaty
Introduction to ParallelAlgorithms / C. Xavier and S.S. Iyengar
Solutions to Parallel and Distributed Computing Problems: Lessons from
BiologicalSciences/AlbertY.Zomaya,FikretErcal,andStephanOlariu(Editors)
New ParallelAlgorithms for DirectSolution ofLinear Equations/
C. Siva Ram Murthy, K.N. BalasubramanyaMurthy, and SrinivasAluru
Practical PRAM Programming /JoergKeller, Christoph Kessler, and
JesperLarssonTraeff
Computational Collective Intelligence / Tadeusz M.Szuba
Parallel &Distributed Computing: ASurvey ofModels,Paradigms,and
Approaches /ClaudiaLeopold
Fundamentals ofDistributed Object Systems: A CORBA Perspective /
Zahir Tari and OmranBukhres
Pipelined ProcessorFarms:Structured Design for Embedded Parallel
Systems / MartinFleuryand Andrew Downton
Handbook ofWirelessNetworksand Mobile Computing / Ivan Stojmenoviic
(Editor)
Internet-BasedWorkflowManagement:Toward aSemantic Web /
Dan C. Marinescu
Parallel ComputingonHeterogeneousNetworks / Alexey L. Lastovetsky
Toolsand Environments for Parallel and Distributed Computing Tools /
Salim Hariri and Manish Parashar
Distributed Computing: Fundamentals,Simulations and AdvancedTopics,
Second Edition /Hagit Attiya and JenniferWelch
Smart Environments: Technology,Protocols andApplications/
Diane J.Cook andSajalK.Das (Editors)
Fundamentals of Computer Organization and Architecture / M. Abd-El-Barr
and H.El-Rewini
FUNDAMENTALS OF
COMPUTER
ORGANIZATION AND
ARCHITECTURE
Mostafa Abd-El-Barr
KingFahd University ofPetroleum&Minerals (KFUPM)
Hesham El-Rewini
Southern Methodist University
A JOHN WILEY & SONS, INC PUBLICATION
Thisbookisprintedonacid-freepaper.(cid:1)1
Copyright#2005byJohnWiley&Sons,Inc.Allrightsreserved.
PublishedbyJohnWiley&Sons,Inc.,Hoboken,NewJersey.
PublishedsimultaneouslyinCanada.
Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmittedinanyformor
byanymeans,electronic,mechanical,photocopying,recording,scanning,orotherwise,exceptas
permittedunderSection107or108ofthe1976UnitedStatesCopyrightAct,withouteithertheprior
writtenpermissionofthePublisher,orauthorizationthroughpaymentoftheappropriateper-copy
feetotheCopyrightClearanceCenter,Inc.,222RosewoodDrive,Danvers,MA01923,
978-750-8400,fax978-646-8600,oronthewebatwww.copyright.com.RequeststothePublisher
forpermissionshouldbeaddressedtothePermissionsDepartment,JohnWiley&Sons,Inc.,
111RiverStreet,Hoboken,NJ07030;(201)748-6011,fax(201)748-6008.
LimitofLiability/DisclaimerofWarranty:Whilethepublisherandauthorhaveusedtheirbestefforts
inpreparingthisbook,theymakenorepresentationsorwarrantieswithrespecttotheaccuracyor
completenessofthecontentsofthisbookandspecificallydisclaimanyimpliedwarrantiesof
merchantabilityorfitnessforaparticularpurpose.Nowarrantymaybecreatedorextendedbysales
representativesorwrittensalesmaterials.Theadviceandstrategiescontainedhereinmaynotbe
suitableforyoursituation.Youshouldconsultwithaprofessionalwhereappropriate.Neitherthe
publishernorauthorshallbeliableforanylossofprofitoranyothercommercialdamages,including
butnotlimitedtospecial,incidental,consequential,orotherdamages.
ForgeneralinformationonourotherproductsandservicespleasecontactourCustomerCareDepartment
withintheU.S.at877-762-2974,outsidetheU.S.at317-572-3993orfax317-572-4002.
Wileyalsopublishesitsbooksinavarietyofelectronicformats.Somecontentthatappearsinprint,
however,maynotbeavailableinelectronicformat.
LibraryofCongressCataloging-in-PublicationData:
Abd-El-Barr,Mostafa.
Fundamentalsofcomputerorganizationandarchitecture/MostafaAbd-El-Barr,HeshamEl-Rewini
p.cm.—(Wileyseriesonparallelanddistributedcomputing)
Includesbibliographicalreferencesandindex.
ISBN0-471-46741-3(clothvolume1)—ISBN0-471-46740-5(clothvolume2)
1. Computerarchitecture.2.Parallelprocessing(Electroniccomputers)I.Abd-El-Barr,Mostafa,1950–
II.Title.III.Series.
QA76.9.A73E472004
004.202—dc22
2004014372
PrintedintheUnitedStatesofAmerica
10987654321
Tomyfamilymembers(Ebtesam,Muhammad,Abd-El-Rahman,Ibrahim,andMai)
fortheirsupportandlove
—MostafaAbd-El-Barr
Tomystudents,forabettertomorrow
—HeshamEl-Rewini
&CONTENTS
Preface xi
1. Introduction toComputer Systems 1
1.1. Historical Background 2
1.2. Architectural Development andStyles 4
1.3. Technological Development 5
1.4. Performance Measures 6
1.5. Summary 11
Exercises 12
Referencesand Further Reading 14
2. Instruction Set Architecture and Design 15
2.1. Memory Locationsand Operations 15
2.2. AddressingModes 18
2.3. InstructionTypes 26
2.4. Programming Examples 31
2.5. Summary 33
Exercises 34
Referencesand Further Reading 35
3. AssemblyLanguageProgramming 37
3.1. ASimple Machine 38
3.2. InstructionsMnemonics andSyntax 40
3.3. AssemblerDirectives and Commands 43
3.4. Assemblyand Executionof Programs 44
3.5. Example:The X86 Family 47
3.6. Summary 55
Exercises 56
Referencesand Further Reading 57
4. ComputerArithmetic 59
4.1. Number Systems 59
4.2. Integer Arithmetic 63
vii
Description:Fundamentals of computer organization and architecture / Mostafa Abd-El-Barr, Hesham El-Rewini p. cm. — (Wiley series on parallel and distributed