ebook img

Fundamentals of Computer Architecture PDF

484 Pages·2004·4.436 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Fundamentals of Computer Architecture

Fundamentals of Computer Architecture Fundamentals of Computer Architecture Mark Burrell (cid:2)c MarkBurrell,2004 Allrightsreserved.Noreproduction,copyortransmissionofthis publicationmaybemadewithoutwrittenpermission. Noparagraphofthispublicationmaybereproduced,copiedortransmitted savewithwrittenpermissionorinaccordancewiththeprovisionsofthe Copyright,DesignsandPatentsAct1988,orunderthetermsofanylicence permittinglimitedcopyingissuedbytheCopyrightLicensingAgency,90 TottenhamCourtRoad,LondonW1T4LP. Anypersonwhodoesanyunauthorisedactinrelationtothispublication maybeliabletocriminalprosecutionandcivilclaimsfordamages. Theauthorshaveassertedtheirrightstobeidentified astheauthorofthisworkinaccordancewiththeCopyright, DesignsandPatentsAct1988. Firstpublished2004by PALGRAVEMACMILLAN Houndmills,Basingstoke,HampshireRG216XSand 175FifthAvenue,NewYork,N.Y.10010 Companiesandrepresentativesthroughouttheworld PALGRAVEMACMILLANistheglobalacademicimprintofthePalgrave MacmillandivisionofSt.Martin’sPress,LLCandofPalgraveMacmillanLtd. (cid:2)r Macmillan isaregisteredtrademarkintheUnitedStates,UnitedKingdom andothercountries.PalgraveisaregisteredtrademarkintheEuropeanUnion andothercountries. ISBN 978-0-333-99866-3 ISBN 978-1-137-11313-9 (eBook) DOI 10.1007/978-1-137-11313-9 Thisbookisprintedonpapersuitableforrecyclingandmadefromfully managedandsustainedforestsources. AcataloguerecordforthisbookisavailablefromtheBritishLibrary. 10 9 8 7 6 5 4 3 2 1 13 12 11 10 09 08 07 06 05 04 Contents Preface xv Acknowledgements xxi I TheBuildingBlocks 1 Chapter1 IntroducingTheProcessor 3 Chapteroverview 3 1.1 ComputersAreEverywhere 3 1.2 AVeryBriefHistoryOfTheComputer 6 1.3 InsideAComputer 8 1.4 TheMinimalistApproach 10 Chaptersummary 15 Chapter2 FundamentalConceptsI-DataRepresentation 17 Chapteroverview 17 2.1 IntroducingNumberRepresentation 17 v FundamentalsofComputerArchitecture 2.2 RepresentingNumbers 18 2.3 IntroducingBinaryArithmetic 25 2.4 SignedNumbers 26 2.5 FloatingPointNumbers 33 2.6 LogicalOperations 34 2.7 DealingWithText 36 Chaptersummary 38 Chapter3 FundamentalConceptsII-DigitalElectronicCircuits 43 Chapteroverview 43 3.1 IntroducingDigitalElectronics 43 3.2 BuildingCircuitsWithGateLogic 47 3.3 BuildingACircuitFromATruthTable 49 3.4 BooleanAlgebra 54 3.5 IntroducingDigitalWorks 58 Chaptersummary 61 Chapter4 Registers 63 Chapteroverview 63 4.1 IntroducingAnElectronicMemory 63 4.2 BuildingARegister 67 4.3 Tri-stateLogic 70 4.4 IntroducingTheClock 75 4.5 UsingRegisters 76 Chaptersummary 78 Chapter5 TheALU 81 vi Contents Chapteroverview 81 5.1 AboutTheALU 81 5.2 InsideTheALU 84 5.3 AdderCircuits 89 5.4 BuildingAnADDCircuit 92 5.5 BuildingAnSLCircuit 95 5.6 BuildingANEGCircuit 96 5.7 UsingTheALUInJASPer 98 Chaptersummary 99 Chapter6 Buses 101 Chapteroverview 101 6.1 WhatisaBus? 101 6.2 BuildingABus 103 6.3 BusesInJASPer 105 Chaptersummary 107 Chapter7 Memory 109 Chapteroverview 109 7.1 IntroducingMemory 109 7.2 BuildingASmallMemory 110 7.3 TypesofMemory 113 7.4 BuildingLargerMemories 115 7.5 BuildingWiderMemories 118 7.6 AddressDecodingStrategies 119 7.7 UsingMemory 121 7.8 ConnectingMemoryToJASPer 124 vii FundamentalsofComputerArchitecture Chaptersummary 126 Chapter8 TheHardwareEngineer’sPerspective 129 Chapteroverview 129 8.1 Recap 129 8.2 AssigningTasksToRegisters 130 8.3 IntroducingMicro-Instructions 132 8.4 IntroducingTheInstructionSet 132 8.5 TheFetch-ExecuteCycle 135 8.6 InsideTheFetch-ExecuteCycle 136 8.7 RunningTheProgramInJASPer 140 Chaptersummary 145 II UsingtheProcessor 147 Chapter9 WritingStructuredPrograms 149 Chapteroverview 149 9.1 IntroducingProgramming 149 9.2 IntroducingAssemblyProgramming 150 9.3 ProgrammingConcepts 151 9.4 WritingOurFirstAssemblyProgram 159 9.5 UsingHigh-LevelLanguages 168 9.6 TipsOnStructuredProgramming 168 Chaptersummary 169 Chapter10 StacksandSubroutines 171 viii Contents Chapteroverview 171 10.1 IntroducingTheStack 171 10.2 HardwareSupportForTheStack 173 10.3 UsingStacks 177 10.4 IntroducingSubroutines 181 10.5 ImplementingSubroutineCallsUsingStacks 183 10.6 UsingSubroutinesInAssemblyLanguage 185 Chaptersummary 187 Chapter11 AddressingModes 189 Chapteroverview 189 11.1 IntroducingAddressingModes 189 11.2 ImmediateAddressing 190 11.3 DirectAddressing 191 11.4 IndirectAddressing 192 11.5 IndexedAddressing 194 11.6 RelativeAddressing 195 11.7 MoreComplexInstructions 195 11.8 AnAddressingExample 197 Chaptersummary 198 Chapter12 Input/Output 201 Chapteroverview 201 12.1 IntroducingInput/Output 201 12.2 PolledI/O 204 12.3 InterruptDrivenI/O 212 12.4 I/OUsingDirectMemoryAccess 213 ix FundamentalsofComputerArchitecture 12.5 OtherMemory-MappedDevices 213 Chaptersummary 214 Chapter13 TheInterruptMechanism 217 Chapteroverview 217 13.1 IntroducingInterrupts 217 13.2 IntroducingASimpleInterruptMechanism 219 13.3 AnExampleInterruptProgram 222 13.4 ComparingSubroutinesWithInterruptHandling 227 13.5 TheFeaturesOfAMoreComplexInterruptMechanism 228 Chaptersummary 228 Chapter14 SystemsSoftware 231 Chapteroverview 231 14.1 IntroducingSystemsSoftware 231 14.2 TheOperatingSystem 232 14.3 SystemsDevelopmentSoftware 232 Chaptersummary 244 Chapter15 BringingItAllTogether-TheProgrammer’sPerspective 247 Chapteroverview 247 15.1 ProblemSpecification 247 15.2 ProgramRefinementOne 249 15.3 ProgramRefinementTwo 254 15.4 ProgramRefinementThree 259 15.5 FinalTestingOfTheProgram 263 x

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.