ebook img

Chapter 10 - Computer Arithmetic PDF

147 Pages·2016·2.26 MB·English
by  
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 Chapter 10 - Computer Arithmetic

Chapter 10 - Computer Arithmetic LuisTarrataca [email protected] CEFET-RJ LuisTarrataca Chapter10-ComputerArithmetic 1/147 1 Motivation 2 ArithmeticandLogicUnit 3 Integerrepresentation Sign-MagnitudeRepresentation TwosComplementRepresentation RangeExtension LuisTarrataca Chapter10-ComputerArithmetic 2/147 4 IntegerArithmetic Negation Addition Subtraction HardwareBlockDiagramforAdder Multiplication UnsignedIntegers Twoscomplementmultiplication 5 Floating-pointrepresentation LuisTarrataca Chapter10-ComputerArithmetic 3/147 Motivation Motivation Howcanacomputerperformarithmeticoperations?Anyideas? LuisTarrataca Chapter10-ComputerArithmetic 4/147 Motivation Howcanacomputerperformarithmeticoperations?Anyideas? • Well,itdependsonthetypeofnumbers:integerandfloatingpoint; • Representationisacrucialdesignissue... • Guesswhatwewillbeseeingnext;) LuisTarrataca Chapter10-ComputerArithmetic 5/147 ArithmeticandLogicUnit What is the computer component responsible for calculations? Any ideas? LuisTarrataca Chapter10-ComputerArithmetic 6/147 ArithmeticandLogicUnit Arithmetic and Logic Unit What is the computer component responsible for calculations? Any ideas? ArithmeticLogicUnit • Componentthatperformsarithmeticandlogicaloperations; • Allothersystemcomponentsaretheremainlyto: • BringdataintotheALU; • Processdata; • Takeresultsbackout; LuisTarrataca Chapter10-ComputerArithmetic 7/147 ArithmeticandLogicUnit WhatisthegeneralorganizationoftheALU?Anyideas? LuisTarrataca Chapter10-ComputerArithmetic 8/147 ArithmeticandLogicUnit WhatisthegeneralorganizationoftheALU?Anyideas? Verygenerally: Figure:ALUInputsandoutputs(Source:[Stallings,2015]) LuisTarrataca Chapter10-ComputerArithmetic 9/147 ArithmeticandLogicUnit Textualdescriptionofthepreviousimage(1/2): • Operandsforarithmetic/logicoperationsareprovidedinregisters; • Resultsofanoperationarealsostoredinregisters; • ALUmayalsosetflagsastheresultofanoperation,e.g.: • Overflowflagissetto1: • Ifaresultexceedsthelengthoftheregisterintowhichitistobestored. • Zeroflagissetto1: • Ifaresultproducesvaluezero(JMP.Z,JMP.NZ,etc...) LuisTarrataca Chapter10-ComputerArithmetic 10/147

Description:
Motivation. Motivation. How can a computer perform arithmetic operations? Any ideas? L. Tarrataca. Chapter 10 - Computer Arithmetic. 4 / 102
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.