SlideShare uma empresa Scribd logo
1 de 3
Chapter3 Notes: Hennessy | Arithmetic for Computers 1
Chapter 3 (Hennessy 4th Ed): Arithmetic for Computers
Supplement(s):
Objectives:
 Introduction
 Addition and Subtraction
 Multiplication
 Division
 Floating Point
 Parallelism and Computer Arithmetic
 Associativity
 Fallacies and Pitfalls
 Concluding Remarks
The goal of this chapter includes representationof realnumbers, what happens ifanoperation creates a number bigger thancanbe represented, howdoes
hardware reallymultiplyor divide numbers, arithmetic algorithms, hardware that follows these algorithms, and the implications of all this for instruction sets.
Content
Addition and Subtraction
 In addition, digits are addedbit bybit from right to left, withcarries passedto the next digit to the left, just as you woulddo byhand. Subtraction
uses addition:the appropriate operand is simplynegated before being added.
 Overflow occurs whenthe result fromanoperation cannot be representedwiththe available hardware, in thiscase a 32-bit word. When can
overflowoccur in addition? When addingoperands withdifferent signs, overflow cannot occur. There are similar restrictions to the occurrence of
overflowduringsubtract, but it’s just the opposite principle: whenthe signs of the operands are the same, overflow cannot occur (as when we
subtract operands of the same sign we endupbyadding operands of different signs). Knowing when overflow cannot occur in additionand
subtraction is all well and good, but howdo we detect it whenit does occur? Clearly, adding or subtracting two 32-bit numbers canyielda result that
needs 33 bits to be fullyexpressed. The lack of a 33rd bit means that whenoverflow occurs, the sign bit is set withthe value of the result insteadof
the proper signof the result. Since we need just one extra bit, onlythe signbit can be wrong. Hence, overflow occurs whenadding two positive
numbers andthe sum is negative, or vice versa. This means a carryout occurredintothe signbit.
 Overflow occurs insubtraction whenwe subtract a negative number from a positive number and get a negative result, or when w e subtract a
positive number from a negative number and get a positive result. Thismeans a borrow occurred fromthe signbit. Figure 3.2 shows the
Chapter3 Notes: Hennessy | Arithmetic for Computers 2
combination ofoperations, operands, andresults that indicate anoverflow.
 We have just seenhow to detect overflowfor two’s complement numbers ina computer. What about overflow withunsignedintegers? Unsigned
integers are commonlyusedfor memoryaddresseswhere overflows are ignored. The computer designer must therefore provide a wayto ignore
overflowinsome casesandto recognize it inothers. The MIPS solutionis to have twokinds ofarithmetic instructions to re cognize the two choices:
■■ Add (add), addimmediate (addi), andsubtract (sub)cause exceptions onoverflow.
■■ Add unsigned (addu), add immediate unsigned(addiu), and subtract unsigned (subu)do not cause exceptions onoverflow.
 Because Cignores overflows, the MIPSC compilers willalways generate the unsigned versions of the arithmetic instructions addu, addiu, andsubu,
no matter what the type ofthe variables. The MIPSFortrancompilers, however, pick the appropriate arithmetic instructions, depending onthe type
of the operands.
 Appendix Cdescribes the hardware that performs additionandsubtraction, which is calledanArithmetic Logic Unit or ALU (It is the hardware that
performs addition, subtraction, and usuallylogical operations such as AND and OR.)
 Although some languageslike CandJava ignore integer overflow, languages like Ada andFortranrequire that the programbe notified. The
programmer or the programming environment must then decide what to dowhenoverflowoccurs.
 MIPS detects overflow withanexception, also calledaninterrupt onmanycomputers. An exception or interrupt is essentiallyanunscheduled
procedure call. The addressof the instructionthat overflowedis saved ina register, andthe computer jumps to a predefined address to invoke the
appropriate routine for that exception. The interrupted addressis savedsothat in some situations the programcancontinue after corrective code is
executed. (Section4.9 covers exceptions in more detail;Chapters 5 and6 describe other situations where exceptions andinterrupts occur.)
 MIPS includes a register calledthe exception programcounter (EPC) to containthe address ofthe instructionthat causedthe exception. The
instruction move fromsystemcontrol (mfc0) is used to copyEPCinto a general-purpose register sothat MIPS software hasthe optionof returning to
the offending instructionvia a jumpregister instruction(The mfc0 (move from coprocessor 0) instruction loads data froma coprocessor 0 register
into a CPU register – uwm.edu).
Arithmetic for Multimedia (relevant summary)
 Manygraphics systems originallyused8 bits to represent eachof the three primarycolors plus 8 bits for a locationof a pixel.
 Architects recognizedthat manygraphics andaudioapplications wouldperform the same operationon vectors of thisdata. Bypartitioningthe carry
chains withina 64-bit adder, a processor couldperform simultaneous operations onshort vectors ofeight 8-bit operands, four 16-bit operands, or
two 32-bit operands. The cost of such partitionedadders was small. These extensions have beencalledvector or SIMD, for single instruction,
multiple data (see Section 2.17 and Chapter 7).
 One feature not generallyfoundingeneral-purpose microprocessors is saturating operations. Saturation means that when a calculation overflows,
the result is set to the largest positive number or most negative number, rather than a modulocalculationas intwo’s complement arithmetic.
Saturationis likelywhat you want for mediaoperations.
 It’s easyto detect overflowinunsignednumbers, althoughthese are almost always ignored because programs don’t want to detect overflow for
address arithmetic, the most commonuse of natural numbers. Two’s complement presents a greater challenge, yet some software systems require
detection ofoverflow, sotodayall computers have a wayto detect it.
 The risingpopularityof multimediaapplications led to arithmetic instructions that support narrower operations that caneasilyoperate inparallel.
 Elaboration: We had saidthat youcopyEPCinto a register via mfc0 andthenreturnto the interruptedcode via jumpregister. This leads to an
interesting question:since you must first transfer EPCto a register to use withjumpregister, howcanjumpregister return to the interruptedcode
Chapter3 Notes: Hennessy | Arithmetic for Computers 3
and restore the original valuesof all registers?Either you restore the oldregisters first, therebydestroyingyour return address fromEPC, which you
placedina register for use injump register, or you restore all registers but the one withthe return addresssothat you canjump—meaningan
exceptionwouldresult inchanging that one register at anytime duringprogram execution!Neither optionis satisfactory. To rescue the hardware
from this dilemma, MIPSprogrammers agreedto reserve registers $k0 and $k1 for the operating system;these registers are not restoredon
exceptions. Just as the MIPS compilers avoidusingregister $at so that the assembler canuse it as a temporaryregister (see Hardware/Software
Interface in Section2.10), compilers also abstainfrom using registers $k0 and$k1 to make them available for the operating system. Exception
routines place the return address in one ofthese registers andthenuse jump register to restore the instruction address.
 Elaboration: The speedof additionis increasedbydetermining the carryin to the high-order bits sooner. There are a varietyof schemes to
anticipate the carryso that the worst-case scenariois a functionof the log2 of the number of bits in the adder. These anticipatorysignals are faster
because theygo throughfewer gates in sequence, but it takes manymore gates to anticipate the proper carry. The most popular is carrylookahead,
which Section C.6 in Appendix Con the CD describes.
Multiplication

ASSOCIATED CONTENT
 XXX
To be cleared
Further Reading
 XXX
More Research
 XXX

Mais conteúdo relacionado

Mais procurados

Comparison of Adders for optimized Exponent Addition circuit in IEEE754 Float...
Comparison of Adders for optimized Exponent Addition circuit in IEEE754 Float...Comparison of Adders for optimized Exponent Addition circuit in IEEE754 Float...
Comparison of Adders for optimized Exponent Addition circuit in IEEE754 Float...IJERD Editor
 
Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Prasenjit Dey
 
Types of Instruction Format
Types of Instruction FormatTypes of Instruction Format
Types of Instruction FormatDhrumil Panchal
 
Pointers lesson 3 (data types and pointer arithmetics)
Pointers lesson 3 (data types and pointer arithmetics)Pointers lesson 3 (data types and pointer arithmetics)
Pointers lesson 3 (data types and pointer arithmetics)SetuMaheshwari1
 
COMPUTER ORGANIZATION NOTES Unit 6
COMPUTER ORGANIZATION NOTES Unit 6COMPUTER ORGANIZATION NOTES Unit 6
COMPUTER ORGANIZATION NOTES Unit 6Dr.MAYA NAYAK
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference InstructionsRabin BK
 
Number formats for signals and coefficients in DSP system
Number formats for signals and coefficients in DSP systemNumber formats for signals and coefficients in DSP system
Number formats for signals and coefficients in DSP systemsarithabanala
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modesRamaPrabha24
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Gaditek
 
Intermediate code representations
Intermediate code representationsIntermediate code representations
Intermediate code representationsahmed51236
 
A nice 64-bit error in C
A  nice 64-bit error in CA  nice 64-bit error in C
A nice 64-bit error in CPVS-Studio
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formatsMazin Alwaaly
 
Explain Half Adder and Full Adder with Truth Table
Explain Half Adder and Full Adder with Truth TableExplain Half Adder and Full Adder with Truth Table
Explain Half Adder and Full Adder with Truth Tableelprocus
 

Mais procurados (14)

Comparison of Adders for optimized Exponent Addition circuit in IEEE754 Float...
Comparison of Adders for optimized Exponent Addition circuit in IEEE754 Float...Comparison of Adders for optimized Exponent Addition circuit in IEEE754 Float...
Comparison of Adders for optimized Exponent Addition circuit in IEEE754 Float...
 
Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Instruction set (prasenjit dey)
Instruction set (prasenjit dey)
 
Types of Instruction Format
Types of Instruction FormatTypes of Instruction Format
Types of Instruction Format
 
Pointers lesson 3 (data types and pointer arithmetics)
Pointers lesson 3 (data types and pointer arithmetics)Pointers lesson 3 (data types and pointer arithmetics)
Pointers lesson 3 (data types and pointer arithmetics)
 
COMPUTER ORGANIZATION NOTES Unit 6
COMPUTER ORGANIZATION NOTES Unit 6COMPUTER ORGANIZATION NOTES Unit 6
COMPUTER ORGANIZATION NOTES Unit 6
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
Number formats for signals and coefficients in DSP system
Number formats for signals and coefficients in DSP systemNumber formats for signals and coefficients in DSP system
Number formats for signals and coefficients in DSP system
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modes
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
Lab 1:c++
Lab 1:c++Lab 1:c++
Lab 1:c++
 
Intermediate code representations
Intermediate code representationsIntermediate code representations
Intermediate code representations
 
A nice 64-bit error in C
A  nice 64-bit error in CA  nice 64-bit error in C
A nice 64-bit error in C
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
 
Explain Half Adder and Full Adder with Truth Table
Explain Half Adder and Full Adder with Truth TableExplain Half Adder and Full Adder with Truth Table
Explain Half Adder and Full Adder with Truth Table
 

Destaque

July_13_2015_Adena_Monitor Final
July_13_2015_Adena_Monitor FinalJuly_13_2015_Adena_Monitor Final
July_13_2015_Adena_Monitor FinalKelsey Dunkle
 
鑽石的切工
鑽石的切工鑽石的切工
鑽石的切工neo423
 
Bättre trafik billigare skärgårdslinjen 2.0 får publiceras fredag 5.9 2014...
Bättre trafik billigare  skärgårdslinjen 2.0   får publiceras fredag 5.9 2014...Bättre trafik billigare  skärgårdslinjen 2.0   får publiceras fredag 5.9 2014...
Bättre trafik billigare skärgårdslinjen 2.0 får publiceras fredag 5.9 2014...EritoCap Ltd
 
The Real World April 2016
The Real World April 2016The Real World April 2016
The Real World April 2016Posterscope
 
Kristiina ja tom grahn houkuttelevat lisää väkeä brändöhön ahvenanmaalle
Kristiina ja tom grahn houkuttelevat lisää väkeä brändöhön ahvenanmaalleKristiina ja tom grahn houkuttelevat lisää väkeä brändöhön ahvenanmaalle
Kristiina ja tom grahn houkuttelevat lisää väkeä brändöhön ahvenanmaalleEritoCap Ltd
 
Atpl book-3-electrics-and-electronics
Atpl book-3-electrics-and-electronicsAtpl book-3-electrics-and-electronics
Atpl book-3-electrics-and-electronicsAndreea Elena Cîrlan
 

Destaque (10)

July_13_2015_Adena_Monitor Final
July_13_2015_Adena_Monitor FinalJuly_13_2015_Adena_Monitor Final
July_13_2015_Adena_Monitor Final
 
鑽石的切工
鑽石的切工鑽石的切工
鑽石的切工
 
CVEnSaugeNolwenn
CVEnSaugeNolwennCVEnSaugeNolwenn
CVEnSaugeNolwenn
 
Bättre trafik billigare skärgårdslinjen 2.0 får publiceras fredag 5.9 2014...
Bättre trafik billigare  skärgårdslinjen 2.0   får publiceras fredag 5.9 2014...Bättre trafik billigare  skärgårdslinjen 2.0   får publiceras fredag 5.9 2014...
Bättre trafik billigare skärgårdslinjen 2.0 får publiceras fredag 5.9 2014...
 
Presentación1
Presentación1Presentación1
Presentación1
 
2016 sep
2016 sep2016 sep
2016 sep
 
Manual de procedimientos 2016
Manual de procedimientos 2016Manual de procedimientos 2016
Manual de procedimientos 2016
 
The Real World April 2016
The Real World April 2016The Real World April 2016
The Real World April 2016
 
Kristiina ja tom grahn houkuttelevat lisää väkeä brändöhön ahvenanmaalle
Kristiina ja tom grahn houkuttelevat lisää väkeä brändöhön ahvenanmaalleKristiina ja tom grahn houkuttelevat lisää väkeä brändöhön ahvenanmaalle
Kristiina ja tom grahn houkuttelevat lisää väkeä brändöhön ahvenanmaalle
 
Atpl book-3-electrics-and-electronics
Atpl book-3-electrics-and-electronicsAtpl book-3-electrics-and-electronics
Atpl book-3-electrics-and-electronics
 

Semelhante a Hennchthree 160912095304

Arithmetic for Computers.ppt
Arithmetic for Computers.pptArithmetic for Computers.ppt
Arithmetic for Computers.pptJEEVANANTHAMG6
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computersBảo Hoang
 
Unit ii ca--arithmetic
Unit ii ca--arithmeticUnit ii ca--arithmetic
Unit ii ca--arithmeticPraba haran
 
The Role Of Software And Hardware As A Common Part Of The...
The Role Of Software And Hardware As A Common Part Of The...The Role Of Software And Hardware As A Common Part Of The...
The Role Of Software And Hardware As A Common Part Of The...Sheena Crouch
 
UNIT 2_ESD.pdf
UNIT 2_ESD.pdfUNIT 2_ESD.pdf
UNIT 2_ESD.pdfSaralaT3
 
C++11 and 64-bit Issues
C++11 and 64-bit IssuesC++11 and 64-bit Issues
C++11 and 64-bit IssuesAndrey Karpov
 
Datapath Design of Computer Architecture
Datapath Design of Computer ArchitectureDatapath Design of Computer Architecture
Datapath Design of Computer ArchitectureAbu Zaman
 
Development of a static code analyzer for detecting errors of porting program...
Development of a static code analyzer for detecting errors of porting program...Development of a static code analyzer for detecting errors of porting program...
Development of a static code analyzer for detecting errors of porting program...PVS-Studio
 
Numerical analysis using Scilab: Error analysis and propagation
Numerical analysis using Scilab: Error analysis and propagationNumerical analysis using Scilab: Error analysis and propagation
Numerical analysis using Scilab: Error analysis and propagationScilab
 
A collection of examples of 64 bit errors in real programs
A collection of examples of 64 bit errors in real programsA collection of examples of 64 bit errors in real programs
A collection of examples of 64 bit errors in real programsMichael Scovetta
 
Lesson 26. Optimization of 64-bit programs
Lesson 26. Optimization of 64-bit programsLesson 26. Optimization of 64-bit programs
Lesson 26. Optimization of 64-bit programsPVS-Studio
 
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...vtunotesbysree
 
Static code analysis for verification of the 64-bit applications
Static code analysis for verification of the 64-bit applicationsStatic code analysis for verification of the 64-bit applications
Static code analysis for verification of the 64-bit applicationsPVS-Studio
 
A Collection of Examples of 64-bit Errors in Real Programs
A Collection of Examples of 64-bit Errors in Real ProgramsA Collection of Examples of 64-bit Errors in Real Programs
A Collection of Examples of 64-bit Errors in Real ProgramsPVS-Studio
 
Fabric design pattern feeding through human machine interface (hmi) for an el...
Fabric design pattern feeding through human machine interface (hmi) for an el...Fabric design pattern feeding through human machine interface (hmi) for an el...
Fabric design pattern feeding through human machine interface (hmi) for an el...eSAT Journals
 
computer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAKcomputer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAKTabsheer Hasan
 
1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAK1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAKTabsheer Hasan
 
A Collection of Examples of 64-bit Errors in Real Programs
A Collection of Examples of 64-bit Errors in Real ProgramsA Collection of Examples of 64-bit Errors in Real Programs
A Collection of Examples of 64-bit Errors in Real ProgramsAndrey Karpov
 
4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]shibbirtanvin
 

Semelhante a Hennchthree 160912095304 (20)

Arithmetic for Computers.ppt
Arithmetic for Computers.pptArithmetic for Computers.ppt
Arithmetic for Computers.ppt
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computers
 
Unit ii ca--arithmetic
Unit ii ca--arithmeticUnit ii ca--arithmetic
Unit ii ca--arithmetic
 
The Role Of Software And Hardware As A Common Part Of The...
The Role Of Software And Hardware As A Common Part Of The...The Role Of Software And Hardware As A Common Part Of The...
The Role Of Software And Hardware As A Common Part Of The...
 
UNIT 2_ESD.pdf
UNIT 2_ESD.pdfUNIT 2_ESD.pdf
UNIT 2_ESD.pdf
 
C++11 and 64-bit Issues
C++11 and 64-bit IssuesC++11 and 64-bit Issues
C++11 and 64-bit Issues
 
Datapath Design of Computer Architecture
Datapath Design of Computer ArchitectureDatapath Design of Computer Architecture
Datapath Design of Computer Architecture
 
Development of a static code analyzer for detecting errors of porting program...
Development of a static code analyzer for detecting errors of porting program...Development of a static code analyzer for detecting errors of porting program...
Development of a static code analyzer for detecting errors of porting program...
 
CAO-Unit-I.pptx
CAO-Unit-I.pptxCAO-Unit-I.pptx
CAO-Unit-I.pptx
 
Numerical analysis using Scilab: Error analysis and propagation
Numerical analysis using Scilab: Error analysis and propagationNumerical analysis using Scilab: Error analysis and propagation
Numerical analysis using Scilab: Error analysis and propagation
 
A collection of examples of 64 bit errors in real programs
A collection of examples of 64 bit errors in real programsA collection of examples of 64 bit errors in real programs
A collection of examples of 64 bit errors in real programs
 
Lesson 26. Optimization of 64-bit programs
Lesson 26. Optimization of 64-bit programsLesson 26. Optimization of 64-bit programs
Lesson 26. Optimization of 64-bit programs
 
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...
 
Static code analysis for verification of the 64-bit applications
Static code analysis for verification of the 64-bit applicationsStatic code analysis for verification of the 64-bit applications
Static code analysis for verification of the 64-bit applications
 
A Collection of Examples of 64-bit Errors in Real Programs
A Collection of Examples of 64-bit Errors in Real ProgramsA Collection of Examples of 64-bit Errors in Real Programs
A Collection of Examples of 64-bit Errors in Real Programs
 
Fabric design pattern feeding through human machine interface (hmi) for an el...
Fabric design pattern feeding through human machine interface (hmi) for an el...Fabric design pattern feeding through human machine interface (hmi) for an el...
Fabric design pattern feeding through human machine interface (hmi) for an el...
 
computer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAKcomputer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAK
 
1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAK1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAK
 
A Collection of Examples of 64-bit Errors in Real Programs
A Collection of Examples of 64-bit Errors in Real ProgramsA Collection of Examples of 64-bit Errors in Real Programs
A Collection of Examples of 64-bit Errors in Real Programs
 
4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]
 

Mais de marangburu42

Hennchthree 161102111515
Hennchthree 161102111515Hennchthree 161102111515
Hennchthree 161102111515marangburu42
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuitsmarangburu42
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuitsmarangburu42
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuitsmarangburu42
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuitsmarangburu42
 
Karnaugh mapping allaboutcircuits
Karnaugh mapping allaboutcircuitsKarnaugh mapping allaboutcircuits
Karnaugh mapping allaboutcircuitsmarangburu42
 
Aac boolean formulae
Aac   boolean formulaeAac   boolean formulae
Aac boolean formulaemarangburu42
 
Virtualmemoryfinal 161019175858
Virtualmemoryfinal 161019175858Virtualmemoryfinal 161019175858
Virtualmemoryfinal 161019175858marangburu42
 
File system interfacefinal
File system interfacefinalFile system interfacefinal
File system interfacefinalmarangburu42
 
File systemimplementationfinal
File systemimplementationfinalFile systemimplementationfinal
File systemimplementationfinalmarangburu42
 
Mass storage structurefinal
Mass storage structurefinalMass storage structurefinal
Mass storage structurefinalmarangburu42
 
All aboutcircuits karnaugh maps
All aboutcircuits karnaugh mapsAll aboutcircuits karnaugh maps
All aboutcircuits karnaugh mapsmarangburu42
 
Virtual memoryfinal
Virtual memoryfinalVirtual memoryfinal
Virtual memoryfinalmarangburu42
 
Mainmemoryfinal 161019122029
Mainmemoryfinal 161019122029Mainmemoryfinal 161019122029
Mainmemoryfinal 161019122029marangburu42
 
Virtualmemorypre final-formatting-161019022904
Virtualmemorypre final-formatting-161019022904Virtualmemorypre final-formatting-161019022904
Virtualmemorypre final-formatting-161019022904marangburu42
 
Process synchronizationfinal
Process synchronizationfinalProcess synchronizationfinal
Process synchronizationfinalmarangburu42
 

Mais de marangburu42 (20)

Hol
HolHol
Hol
 
Write miss
Write missWrite miss
Write miss
 
Hennchthree 161102111515
Hennchthree 161102111515Hennchthree 161102111515
Hennchthree 161102111515
 
Hennchthree
HennchthreeHennchthree
Hennchthree
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Karnaugh mapping allaboutcircuits
Karnaugh mapping allaboutcircuitsKarnaugh mapping allaboutcircuits
Karnaugh mapping allaboutcircuits
 
Aac boolean formulae
Aac   boolean formulaeAac   boolean formulae
Aac boolean formulae
 
Virtualmemoryfinal 161019175858
Virtualmemoryfinal 161019175858Virtualmemoryfinal 161019175858
Virtualmemoryfinal 161019175858
 
Io systems final
Io systems finalIo systems final
Io systems final
 
File system interfacefinal
File system interfacefinalFile system interfacefinal
File system interfacefinal
 
File systemimplementationfinal
File systemimplementationfinalFile systemimplementationfinal
File systemimplementationfinal
 
Mass storage structurefinal
Mass storage structurefinalMass storage structurefinal
Mass storage structurefinal
 
All aboutcircuits karnaugh maps
All aboutcircuits karnaugh mapsAll aboutcircuits karnaugh maps
All aboutcircuits karnaugh maps
 
Virtual memoryfinal
Virtual memoryfinalVirtual memoryfinal
Virtual memoryfinal
 
Mainmemoryfinal 161019122029
Mainmemoryfinal 161019122029Mainmemoryfinal 161019122029
Mainmemoryfinal 161019122029
 
Virtualmemorypre final-formatting-161019022904
Virtualmemorypre final-formatting-161019022904Virtualmemorypre final-formatting-161019022904
Virtualmemorypre final-formatting-161019022904
 
Process synchronizationfinal
Process synchronizationfinalProcess synchronizationfinal
Process synchronizationfinal
 

Último

VIP Model Call Girls Wakad ( Pune ) Call ON 8005736733 Starting From 5K to 25...
VIP Model Call Girls Wakad ( Pune ) Call ON 8005736733 Starting From 5K to 25...VIP Model Call Girls Wakad ( Pune ) Call ON 8005736733 Starting From 5K to 25...
VIP Model Call Girls Wakad ( Pune ) Call ON 8005736733 Starting From 5K to 25...SUHANI PANDEY
 
Call Girls Junnar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Junnar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Junnar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Junnar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Budhwar Peth { Russian Call Girls Pune (Adult Only) 8005736733 Escort Servic...
Budhwar Peth { Russian Call Girls Pune  (Adult Only) 8005736733 Escort Servic...Budhwar Peth { Russian Call Girls Pune  (Adult Only) 8005736733 Escort Servic...
Budhwar Peth { Russian Call Girls Pune (Adult Only) 8005736733 Escort Servic...SUHANI PANDEY
 
Kalyani Nagar & Escort Service in Pune Phone No 8005736733 Elite Escort Servi...
Kalyani Nagar & Escort Service in Pune Phone No 8005736733 Elite Escort Servi...Kalyani Nagar & Escort Service in Pune Phone No 8005736733 Elite Escort Servi...
Kalyani Nagar & Escort Service in Pune Phone No 8005736733 Elite Escort Servi...SUHANI PANDEY
 
best call girls in Pune | Whatsapp No 8005736733 VIP Escorts Service Availabl...
best call girls in Pune | Whatsapp No 8005736733 VIP Escorts Service Availabl...best call girls in Pune | Whatsapp No 8005736733 VIP Escorts Service Availabl...
best call girls in Pune | Whatsapp No 8005736733 VIP Escorts Service Availabl...SUHANI PANDEY
 
VIP Model Call Girls Sangvi ( Pune ) Call ON 8005736733 Starting From 5K to 2...
VIP Model Call Girls Sangvi ( Pune ) Call ON 8005736733 Starting From 5K to 2...VIP Model Call Girls Sangvi ( Pune ) Call ON 8005736733 Starting From 5K to 2...
VIP Model Call Girls Sangvi ( Pune ) Call ON 8005736733 Starting From 5K to 2...SUHANI PANDEY
 
Booking open Available Pune Call Girls Sanaswadi 6297143586 Call Hot Indian ...
Booking open Available Pune Call Girls Sanaswadi  6297143586 Call Hot Indian ...Booking open Available Pune Call Girls Sanaswadi  6297143586 Call Hot Indian ...
Booking open Available Pune Call Girls Sanaswadi 6297143586 Call Hot Indian ...Call Girls in Nagpur High Profile
 
Daund ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For Se...
Daund ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For Se...Daund ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For Se...
Daund ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For Se...tanu pandey
 
VIP Model Call Girls Shivane ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Shivane ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Shivane ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Shivane ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Get Premium Austin Town Call Girls (8005736733) 24x7 Rate 15999 with A/c Room...
Get Premium Austin Town Call Girls (8005736733) 24x7 Rate 15999 with A/c Room...Get Premium Austin Town Call Girls (8005736733) 24x7 Rate 15999 with A/c Room...
Get Premium Austin Town Call Girls (8005736733) 24x7 Rate 15999 with A/c Room...MOHANI PANDEY
 
VVIP Pune Call Girls Saswad WhatSapp Number 8005736733 With Elite Staff And R...
VVIP Pune Call Girls Saswad WhatSapp Number 8005736733 With Elite Staff And R...VVIP Pune Call Girls Saswad WhatSapp Number 8005736733 With Elite Staff And R...
VVIP Pune Call Girls Saswad WhatSapp Number 8005736733 With Elite Staff And R...SUHANI PANDEY
 
Top Rated Pune Call Girls Yashwant Nagar ⟟ 6297143586 ⟟ Call Me For Genuine ...
Top Rated  Pune Call Girls Yashwant Nagar ⟟ 6297143586 ⟟ Call Me For Genuine ...Top Rated  Pune Call Girls Yashwant Nagar ⟟ 6297143586 ⟟ Call Me For Genuine ...
Top Rated Pune Call Girls Yashwant Nagar ⟟ 6297143586 ⟟ Call Me For Genuine ...Call Girls in Nagpur High Profile
 
VIP Model Call Girls Alandi ( Pune ) Call ON 8005736733 Starting From 5K to 2...
VIP Model Call Girls Alandi ( Pune ) Call ON 8005736733 Starting From 5K to 2...VIP Model Call Girls Alandi ( Pune ) Call ON 8005736733 Starting From 5K to 2...
VIP Model Call Girls Alandi ( Pune ) Call ON 8005736733 Starting From 5K to 2...SUHANI PANDEY
 
Call Girls Uruli Kanchan Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Uruli Kanchan Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Uruli Kanchan Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Uruli Kanchan Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Dighi ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For Se...
Dighi ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For Se...Dighi ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For Se...
Dighi ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For Se...tanu pandey
 
VVIP Pune Call Girls Narayangaon WhatSapp Number 8005736733 With Elite Staff ...
VVIP Pune Call Girls Narayangaon WhatSapp Number 8005736733 With Elite Staff ...VVIP Pune Call Girls Narayangaon WhatSapp Number 8005736733 With Elite Staff ...
VVIP Pune Call Girls Narayangaon WhatSapp Number 8005736733 With Elite Staff ...SUHANI PANDEY
 
Top Rated Pune Call Girls JM road ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls JM road ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls JM road ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls JM road ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Call Girls in Nagpur High Profile
 
Call Girls Sb Road Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Sb Road Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Sb Road Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Sb Road Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
VIP Model Call Girls Wadgaon Sheri ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Wadgaon Sheri ( Pune ) Call ON 8005736733 Starting From ...VIP Model Call Girls Wadgaon Sheri ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Wadgaon Sheri ( Pune ) Call ON 8005736733 Starting From ...SUHANI PANDEY
 
WhatsApp Chat: 📞 8617697112 Call Girl Reasi is experienced
WhatsApp Chat: 📞 8617697112 Call Girl Reasi is experiencedWhatsApp Chat: 📞 8617697112 Call Girl Reasi is experienced
WhatsApp Chat: 📞 8617697112 Call Girl Reasi is experiencedNitya salvi
 

Último (20)

VIP Model Call Girls Wakad ( Pune ) Call ON 8005736733 Starting From 5K to 25...
VIP Model Call Girls Wakad ( Pune ) Call ON 8005736733 Starting From 5K to 25...VIP Model Call Girls Wakad ( Pune ) Call ON 8005736733 Starting From 5K to 25...
VIP Model Call Girls Wakad ( Pune ) Call ON 8005736733 Starting From 5K to 25...
 
Call Girls Junnar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Junnar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Junnar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Junnar Call Me 7737669865 Budget Friendly No Advance Booking
 
Budhwar Peth { Russian Call Girls Pune (Adult Only) 8005736733 Escort Servic...
Budhwar Peth { Russian Call Girls Pune  (Adult Only) 8005736733 Escort Servic...Budhwar Peth { Russian Call Girls Pune  (Adult Only) 8005736733 Escort Servic...
Budhwar Peth { Russian Call Girls Pune (Adult Only) 8005736733 Escort Servic...
 
Kalyani Nagar & Escort Service in Pune Phone No 8005736733 Elite Escort Servi...
Kalyani Nagar & Escort Service in Pune Phone No 8005736733 Elite Escort Servi...Kalyani Nagar & Escort Service in Pune Phone No 8005736733 Elite Escort Servi...
Kalyani Nagar & Escort Service in Pune Phone No 8005736733 Elite Escort Servi...
 
best call girls in Pune | Whatsapp No 8005736733 VIP Escorts Service Availabl...
best call girls in Pune | Whatsapp No 8005736733 VIP Escorts Service Availabl...best call girls in Pune | Whatsapp No 8005736733 VIP Escorts Service Availabl...
best call girls in Pune | Whatsapp No 8005736733 VIP Escorts Service Availabl...
 
VIP Model Call Girls Sangvi ( Pune ) Call ON 8005736733 Starting From 5K to 2...
VIP Model Call Girls Sangvi ( Pune ) Call ON 8005736733 Starting From 5K to 2...VIP Model Call Girls Sangvi ( Pune ) Call ON 8005736733 Starting From 5K to 2...
VIP Model Call Girls Sangvi ( Pune ) Call ON 8005736733 Starting From 5K to 2...
 
Booking open Available Pune Call Girls Sanaswadi 6297143586 Call Hot Indian ...
Booking open Available Pune Call Girls Sanaswadi  6297143586 Call Hot Indian ...Booking open Available Pune Call Girls Sanaswadi  6297143586 Call Hot Indian ...
Booking open Available Pune Call Girls Sanaswadi 6297143586 Call Hot Indian ...
 
Daund ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For Se...
Daund ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For Se...Daund ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For Se...
Daund ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For Se...
 
VIP Model Call Girls Shivane ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Shivane ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Shivane ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Shivane ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Get Premium Austin Town Call Girls (8005736733) 24x7 Rate 15999 with A/c Room...
Get Premium Austin Town Call Girls (8005736733) 24x7 Rate 15999 with A/c Room...Get Premium Austin Town Call Girls (8005736733) 24x7 Rate 15999 with A/c Room...
Get Premium Austin Town Call Girls (8005736733) 24x7 Rate 15999 with A/c Room...
 
VVIP Pune Call Girls Saswad WhatSapp Number 8005736733 With Elite Staff And R...
VVIP Pune Call Girls Saswad WhatSapp Number 8005736733 With Elite Staff And R...VVIP Pune Call Girls Saswad WhatSapp Number 8005736733 With Elite Staff And R...
VVIP Pune Call Girls Saswad WhatSapp Number 8005736733 With Elite Staff And R...
 
Top Rated Pune Call Girls Yashwant Nagar ⟟ 6297143586 ⟟ Call Me For Genuine ...
Top Rated  Pune Call Girls Yashwant Nagar ⟟ 6297143586 ⟟ Call Me For Genuine ...Top Rated  Pune Call Girls Yashwant Nagar ⟟ 6297143586 ⟟ Call Me For Genuine ...
Top Rated Pune Call Girls Yashwant Nagar ⟟ 6297143586 ⟟ Call Me For Genuine ...
 
VIP Model Call Girls Alandi ( Pune ) Call ON 8005736733 Starting From 5K to 2...
VIP Model Call Girls Alandi ( Pune ) Call ON 8005736733 Starting From 5K to 2...VIP Model Call Girls Alandi ( Pune ) Call ON 8005736733 Starting From 5K to 2...
VIP Model Call Girls Alandi ( Pune ) Call ON 8005736733 Starting From 5K to 2...
 
Call Girls Uruli Kanchan Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Uruli Kanchan Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Uruli Kanchan Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Uruli Kanchan Call Me 7737669865 Budget Friendly No Advance Booking
 
Dighi ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For Se...
Dighi ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For Se...Dighi ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For Se...
Dighi ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For Se...
 
VVIP Pune Call Girls Narayangaon WhatSapp Number 8005736733 With Elite Staff ...
VVIP Pune Call Girls Narayangaon WhatSapp Number 8005736733 With Elite Staff ...VVIP Pune Call Girls Narayangaon WhatSapp Number 8005736733 With Elite Staff ...
VVIP Pune Call Girls Narayangaon WhatSapp Number 8005736733 With Elite Staff ...
 
Top Rated Pune Call Girls JM road ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls JM road ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls JM road ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls JM road ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
 
Call Girls Sb Road Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Sb Road Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Sb Road Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Sb Road Call Me 7737669865 Budget Friendly No Advance Booking
 
VIP Model Call Girls Wadgaon Sheri ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Wadgaon Sheri ( Pune ) Call ON 8005736733 Starting From ...VIP Model Call Girls Wadgaon Sheri ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Wadgaon Sheri ( Pune ) Call ON 8005736733 Starting From ...
 
WhatsApp Chat: 📞 8617697112 Call Girl Reasi is experienced
WhatsApp Chat: 📞 8617697112 Call Girl Reasi is experiencedWhatsApp Chat: 📞 8617697112 Call Girl Reasi is experienced
WhatsApp Chat: 📞 8617697112 Call Girl Reasi is experienced
 

Hennchthree 160912095304

  • 1. Chapter3 Notes: Hennessy | Arithmetic for Computers 1 Chapter 3 (Hennessy 4th Ed): Arithmetic for Computers Supplement(s): Objectives:  Introduction  Addition and Subtraction  Multiplication  Division  Floating Point  Parallelism and Computer Arithmetic  Associativity  Fallacies and Pitfalls  Concluding Remarks The goal of this chapter includes representationof realnumbers, what happens ifanoperation creates a number bigger thancanbe represented, howdoes hardware reallymultiplyor divide numbers, arithmetic algorithms, hardware that follows these algorithms, and the implications of all this for instruction sets. Content Addition and Subtraction  In addition, digits are addedbit bybit from right to left, withcarries passedto the next digit to the left, just as you woulddo byhand. Subtraction uses addition:the appropriate operand is simplynegated before being added.  Overflow occurs whenthe result fromanoperation cannot be representedwiththe available hardware, in thiscase a 32-bit word. When can overflowoccur in addition? When addingoperands withdifferent signs, overflow cannot occur. There are similar restrictions to the occurrence of overflowduringsubtract, but it’s just the opposite principle: whenthe signs of the operands are the same, overflow cannot occur (as when we subtract operands of the same sign we endupbyadding operands of different signs). Knowing when overflow cannot occur in additionand subtraction is all well and good, but howdo we detect it whenit does occur? Clearly, adding or subtracting two 32-bit numbers canyielda result that needs 33 bits to be fullyexpressed. The lack of a 33rd bit means that whenoverflow occurs, the sign bit is set withthe value of the result insteadof the proper signof the result. Since we need just one extra bit, onlythe signbit can be wrong. Hence, overflow occurs whenadding two positive numbers andthe sum is negative, or vice versa. This means a carryout occurredintothe signbit.  Overflow occurs insubtraction whenwe subtract a negative number from a positive number and get a negative result, or when w e subtract a positive number from a negative number and get a positive result. Thismeans a borrow occurred fromthe signbit. Figure 3.2 shows the
  • 2. Chapter3 Notes: Hennessy | Arithmetic for Computers 2 combination ofoperations, operands, andresults that indicate anoverflow.  We have just seenhow to detect overflowfor two’s complement numbers ina computer. What about overflow withunsignedintegers? Unsigned integers are commonlyusedfor memoryaddresseswhere overflows are ignored. The computer designer must therefore provide a wayto ignore overflowinsome casesandto recognize it inothers. The MIPS solutionis to have twokinds ofarithmetic instructions to re cognize the two choices: ■■ Add (add), addimmediate (addi), andsubtract (sub)cause exceptions onoverflow. ■■ Add unsigned (addu), add immediate unsigned(addiu), and subtract unsigned (subu)do not cause exceptions onoverflow.  Because Cignores overflows, the MIPSC compilers willalways generate the unsigned versions of the arithmetic instructions addu, addiu, andsubu, no matter what the type ofthe variables. The MIPSFortrancompilers, however, pick the appropriate arithmetic instructions, depending onthe type of the operands.  Appendix Cdescribes the hardware that performs additionandsubtraction, which is calledanArithmetic Logic Unit or ALU (It is the hardware that performs addition, subtraction, and usuallylogical operations such as AND and OR.)  Although some languageslike CandJava ignore integer overflow, languages like Ada andFortranrequire that the programbe notified. The programmer or the programming environment must then decide what to dowhenoverflowoccurs.  MIPS detects overflow withanexception, also calledaninterrupt onmanycomputers. An exception or interrupt is essentiallyanunscheduled procedure call. The addressof the instructionthat overflowedis saved ina register, andthe computer jumps to a predefined address to invoke the appropriate routine for that exception. The interrupted addressis savedsothat in some situations the programcancontinue after corrective code is executed. (Section4.9 covers exceptions in more detail;Chapters 5 and6 describe other situations where exceptions andinterrupts occur.)  MIPS includes a register calledthe exception programcounter (EPC) to containthe address ofthe instructionthat causedthe exception. The instruction move fromsystemcontrol (mfc0) is used to copyEPCinto a general-purpose register sothat MIPS software hasthe optionof returning to the offending instructionvia a jumpregister instruction(The mfc0 (move from coprocessor 0) instruction loads data froma coprocessor 0 register into a CPU register – uwm.edu). Arithmetic for Multimedia (relevant summary)  Manygraphics systems originallyused8 bits to represent eachof the three primarycolors plus 8 bits for a locationof a pixel.  Architects recognizedthat manygraphics andaudioapplications wouldperform the same operationon vectors of thisdata. Bypartitioningthe carry chains withina 64-bit adder, a processor couldperform simultaneous operations onshort vectors ofeight 8-bit operands, four 16-bit operands, or two 32-bit operands. The cost of such partitionedadders was small. These extensions have beencalledvector or SIMD, for single instruction, multiple data (see Section 2.17 and Chapter 7).  One feature not generallyfoundingeneral-purpose microprocessors is saturating operations. Saturation means that when a calculation overflows, the result is set to the largest positive number or most negative number, rather than a modulocalculationas intwo’s complement arithmetic. Saturationis likelywhat you want for mediaoperations.  It’s easyto detect overflowinunsignednumbers, althoughthese are almost always ignored because programs don’t want to detect overflow for address arithmetic, the most commonuse of natural numbers. Two’s complement presents a greater challenge, yet some software systems require detection ofoverflow, sotodayall computers have a wayto detect it.  The risingpopularityof multimediaapplications led to arithmetic instructions that support narrower operations that caneasilyoperate inparallel.  Elaboration: We had saidthat youcopyEPCinto a register via mfc0 andthenreturnto the interruptedcode via jumpregister. This leads to an interesting question:since you must first transfer EPCto a register to use withjumpregister, howcanjumpregister return to the interruptedcode
  • 3. Chapter3 Notes: Hennessy | Arithmetic for Computers 3 and restore the original valuesof all registers?Either you restore the oldregisters first, therebydestroyingyour return address fromEPC, which you placedina register for use injump register, or you restore all registers but the one withthe return addresssothat you canjump—meaningan exceptionwouldresult inchanging that one register at anytime duringprogram execution!Neither optionis satisfactory. To rescue the hardware from this dilemma, MIPSprogrammers agreedto reserve registers $k0 and $k1 for the operating system;these registers are not restoredon exceptions. Just as the MIPS compilers avoidusingregister $at so that the assembler canuse it as a temporaryregister (see Hardware/Software Interface in Section2.10), compilers also abstainfrom using registers $k0 and$k1 to make them available for the operating system. Exception routines place the return address in one ofthese registers andthenuse jump register to restore the instruction address.  Elaboration: The speedof additionis increasedbydetermining the carryin to the high-order bits sooner. There are a varietyof schemes to anticipate the carryso that the worst-case scenariois a functionof the log2 of the number of bits in the adder. These anticipatorysignals are faster because theygo throughfewer gates in sequence, but it takes manymore gates to anticipate the proper carry. The most popular is carrylookahead, which Section C.6 in Appendix Con the CD describes. Multiplication  ASSOCIATED CONTENT  XXX To be cleared Further Reading  XXX More Research  XXX