EEM 486: Computer Architecture

Similar documents
Mechanics Physics 151

Solution in semi infinite diffusion couples (error function analysis)

Lecture 12: Adders, Sequential Circuits

2/20/2013. EE 101 Midterm 2 Review

SOME USEFUL MATHEMATICS

Supporting information How to concatenate the local attractors of subnetworks in the HPFP

e t dt e t dt = lim e t dt T (1 e T ) = 1

Review: Transformations. Transformations - Viewing. Transformations - Modeling. world CAMERA OBJECT WORLD CSE 681 CSE 681 CSE 681 CSE 681

Addition and Subtraction

Chapter Lagrangian Interpolation

Advanced Electromechanical Systems (ELE 847)

A Kalman filtering simulation

Electrostatic/magnetostatic forces

4.8 Improper Integrals

Chapter 2 Linear Mo on

GENERATING CERTAIN QUINTIC IRREDUCIBLE POLYNOMIALS OVER FINITE FIELDS. Youngwoo Ahn and Kitae Kim

EC 413 Computer Organization

Physics 201 Lecture 2

TSS = SST + SSE An orthogonal partition of the total SS

Linear Response Theory: The connection between QFT and experiments

V.Abramov - FURTHER ANALYSIS OF CONFIDENCE INTERVALS FOR LARGE CLIENT/SERVER COMPUTER NETWORKS

September 20 Homework Solutions

10. A.C CIRCUITS. Theoretically current grows to maximum value after infinite time. But practically it grows to maximum after 5τ. Decay of current :

Advanced Machine Learning & Perception

The Characterization of Jones Polynomial. for Some Knots

January Examinations 2012

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

_ J.. C C A 551NED. - n R ' ' t i :. t ; . b c c : : I I .., I AS IEC. r '2 5? 9

UNIVERSITAT AUTÒNOMA DE BARCELONA MARCH 2017 EXAMINATION

CHAPTER 7: CLUSTERING

Comparison of Differences between Power Means 1

How about the more general "linear" scalar functions of scalars (i.e., a 1st degree polynomial of the following form with a constant term )?

Lecture 12: Adders, Sequential Circuits

Ordinary Differential Equations in Neuroscience with Matlab examples. Aim 1- Gain understanding of how to set up and solve ODE s

Lecture 18: The Laplace Transform (See Sections and 14.7 in Boas)

Average & instantaneous velocity and acceleration Motion with constant acceleration

Volatility Interpolation

Testing a new idea to solve the P = NP problem with mathematical induction

Mechanics Physics 151

CS434a/541a: Pattern Recognition Prof. Olga Veksler. Lecture 4

Technical Appendix for Inventory Management for an Assembly System with Product or Component Returns, DeCroix and Zipkin, Management Science 2005.

Energy Storage Devices

Minimum Squared Error

[ ] 2. [ ]3 + (Δx i + Δx i 1 ) / 2. Δx i-1 Δx i Δx i+1. TPG4160 Reservoir Simulation 2018 Lecture note 3. page 1 of 5

Minimum Squared Error

Mechanics Physics 151

Chapter 6: AC Circuits

Midterm Exam. Thursday, April hour, 15 minutes

Chapter Direct Method of Interpolation

Chapters 2 Kinematics. Position, Distance, Displacement

Lecture VI Regression

Example: MOSFET Amplifier Distortion

( ) () we define the interaction representation by the unitary transformation () = ()

Physic 231 Lecture 4. Mi it ftd l t. Main points of today s lecture: Example: addition of velocities Trajectories of objects in 2 = =

Comb Filters. Comb Filters

J i-1 i. J i i+1. Numerical integration of the diffusion equation (I) Finite difference method. Spatial Discretization. Internal nodes.

Clustering (Bishop ch 9)

Motion in Two Dimensions

Lecture 11 SVM cont

Econ107 Applied Econometrics Topic 5: Specification: Choosing Independent Variables (Studenmund, Chapter 6)

Notes on the stability of dynamic systems and the use of Eigen Values.

In the complete model, these slopes are ANALYSIS OF VARIANCE FOR THE COMPLETE TWO-WAY MODEL. (! i+1 -! i ) + [(!") i+1,q - [(!

II. Light is a Ray (Geometrical Optics)


COE 202: Digital Logic Design Combinational Circuits Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

The solution is often represented as a vector: 2xI + 4X2 + 2X3 + 4X4 + 2X5 = 4 2xI + 4X2 + 3X3 + 3X4 + 3X5 = 4. 3xI + 6X2 + 6X3 + 3X4 + 6X5 = 6.

Motion. Part 2: Constant Acceleration. Acceleration. October Lab Physics. Ms. Levine 1. Acceleration. Acceleration. Units for Acceleration.

6.003: Signals and Systems

Let s treat the problem of the response of a system to an applied external force. Again,

THEORETICAL AUTOCORRELATIONS. ) if often denoted by γ. Note that

Lecture 6: Learning for Control (Generalised Linear Regression)

10.37 Chemical and Biological Reaction Engineering, Spring 2007 Prof. K. Dane Wittrup Lecture 10: Non ideal Reactor Mixing Patterns

Some Inequalities variations on a common theme Lecture I, UL 2007

[Link to MIT-Lab 6P.1 goes here.] After completing the lab, fill in the following blanks: Numerical. Simulation s Calculations

Go over vector and vector algebra Displacement and position in 2-D Average and instantaneous velocity in 2-D Average and instantaneous acceleration

Magnetostatics Bar Magnet. Magnetostatics Oersted s Experiment

Department of Economics University of Toronto

Linear Response Theory: The connection between QFT and experiments

Chapter 2. Motion along a straight line. 9/9/2015 Physics 218

Direct Current Circuits

PHYSICS 1210 Exam 1 University of Wyoming 14 February points

CS286.2 Lecture 14: Quantum de Finetti Theorems II

Graduate Macroeconomics 2 Problem set 5. - Solutions

Lecture 13: Sequential Circuits

NPTEL Project. Econometric Modelling. Module23: Granger Causality Test. Lecture35: Granger Causality Test. Vinod Gupta School of Management

Modeling and Predicting Sequences: HMM and (may be) CRF. Amr Ahmed Feb 25

Lecture Slides for INTRODUCTION TO. Machine Learning. ETHEM ALPAYDIN The MIT Press,

A capacitor consists of two conducting plates, separated by an insulator. Conduction plates: e.g., Aluminum foil Insulator: air, mica, ceramic, etc

5-1. We apply Newton s second law (specifically, Eq. 5-2). F = ma = ma sin 20.0 = 1.0 kg 2.00 m/s sin 20.0 = 0.684N. ( ) ( )

Suppose that an object is moving along a vertical line, and its vertical position is given by L (t). velocity of the object between t 1 and t 2 is

. The geometric multiplicity is dim[ker( λi. number of linearly independent eigenvectors associated with this eigenvalue.

CH.3. COMPATIBILITY EQUATIONS. Continuum Mechanics Course (MMC) - ETSECCPB - UPC

Lecture 4 Kinetics of a particle Part 3: Impulse and Momentum

. The geometric multiplicity is dim[ker( λi. A )], i.e. the number of linearly independent eigenvectors associated with this eigenvalue.

15/03/1439. Lecture 4: Linear Time Invariant (LTI) systems

Voltage/current relationship Stored Energy. RL / RC circuits Steady State / Transient response Natural / Step response

M1 a. So there are 4 cases from the total 16.

Chapter #1 EEE8013 EEE3001. Linear Controller Design and State Space Analysis

The Mathematics of Harmonic Oscillators

On One Analytic Method of. Constructing Program Controls

Transcription:

EEM 486: Compuer Archecure Lecure 4 ALU EEM 486 MIPS Arhmec Insrucons R-ype I-ype Insrucon Exmpe Menng Commen dd dd $,$2,$3 $ = $2 + $3 sub sub $,$2,$3 $ = $2 - $3 3 opernds; overfow deeced 3 opernds; overfow deeced dd unsgned ddu $,$2,$3 $ = $2 + $3 3 opernds; no excepon sub unsgned subu $,$2,$3 $ = $2 - $3 3 opernds; no excepon dd mmede dd mmede unsgned dd $,$2, $ = $2 + ddu $,$2, $ = $2 + + consn; overfow deeced; sgn exenson + consn; no excepon; sgn exenson Arhmec operons: dd, subrc Lec 4.2

MIPS Logc Insrucons R-ype I-ype Insrucon Exmpe Menng Commen nd nd $,$2,$3 $ = $2 & $3 3 opernds; Logc AND or or $,$2,$3 $ = $2 $3 3 opernds; Logc OR xor xor $,$2,$3 $ = $2 Å $3 3 opernds; Logc XOR nor nor $,$2,$3 $ = ~($2 $3) 3 opernds; Logc NOR nd mmede or mmede xor mmede nd $,$2, $ = $2 & or $,$2, $ = $2 xor $,$2, $ = $2 Å Logc AND reg, consn Logc OR reg, consn Logc XOR reg, consn Logc operons: nd, or, xor, nor Lec 4.3 Numbers Bnry numbers (bse 2)... Bs re jus bs (no nheren menng) convenons defne reonshp beween bs nd numbers Of course ges more compced: numbers re fne (overfow) frcons nd re numbers negve numbers How do we represen negve numbers?.e., whch b perns w represen whch numbers? Lec 4.4

Possbe Represenons Sgn Mgnude: One's Compemen Two's Compemen = + = + = + = + = + = + = +2 = +2 = +2 = +3 = +3 = +3 = - = -3 = -4 = - = -2 = -3 = -2 = - = -2 = -3 = - = - Issues: bnce, number of zeros, ese of operons Whch one s bes? Why? Lec 4.5 Two s compemen 32 b sgned numbers: wo = en wo = + en wo = + 2 en mxn... wo = + 2,47,483,646 en wo = + 2,47,483,647 en wo = 2,47,483,648 en wo = 2,47,483,647 en wo = 2,47,483,646 en... mnn wo = 3 en wo = 2 en wo = en Lec 4.6

Two's Compemen Operons Negng wo's compemen number: nver bs nd dd remember: nege nd nver re que dfferen! Converng n b numbers no numbers wh more hn n bs: MIPS 6 b mmede ges convered o 32 bs for rhmec copy he mos sgnfcn b (he sgn b) no he oher bs -> -> Lec 4.7 Addon & Subrcon Jus ke n grde schoo (crry/borrow s) + - - Two's compemen operons esy subrcon usng ddon of negve numbers + Overfow (resu oo rge for fne compuer word): e.g., ddng wo n-b numbers does no yed n n-b number + noe h overfow erm s somewh msedng, does no men crry overfowed Lec 4.8

Deecng Overfow No overfow when sgns re he oppose for ddon No overfow when sgns re he sme for subrcon Overfow occurs when he vue ffecs he sgn: overfow when ddng wo posves yeds negve or, ddng wo negves gves posve or, subrc negve from posve nd ge negve or, subrc posve from negve nd ge posve Consder he operons A + B nd A B Cn overfow occur f B s? Cn overfow occur f A s? Lec 4.9 Effecs of Overfow An excepon (nerrup) occurs Conro jumps o predefned ddress for excepon Inerruped ddress s sved for possbe resumpon Des bsed on sofwre sysem / nguge exmpe: fgh conro vs. homework ssgnmen Don' wys wn o deec overfow MIPS nsrucons: ddu, ddu, subu noe: ddu s sgn-exends! su, su for unsgned comprsons Lec 4.

-b ALU Bnver Operon Bnver Operon Resu Resu X nd b X or b b 2 + b - b CrryOu -b fu-dder: b Sum Cou = b + Cn + b Cn nd Sum = xor b xor Cn Crryou b seec c 2 o Mupexer c = f seec= ; c = b f seec = Lec 4. Torng he ALU for MIPS Need o suppor he se-on-ess-hn nsrucon (s) remember: s s n rhmec nsrucon produces f rs < r nd oherwse use subrcon: (-b) < mpes < b Need o suppor es for equy (beq $5, $6, be) use subrcon: (-b) = mpes = b Lec 4.2

Supporng s B n v e r O p e r o n B n v e r O p e r o n b 2 R e s u R e s u b 2 3 S e 3 O v e r f o w d e e c o n O v e r f o w C r r y O u - b ALU - b ALU for MSB Afer 32-b subrc operon: < b => Se = nd Resu =... o.w. => Se = nd Resu =... Lec 4.3 A 32-b ALU Benege Operon operon b A L U C r r y O u R e s u 32 ALU 32 resu b A L U C r r y O u R e s u Z e r o b zero overfow 2 b 2 A L U 2 C r r y O u R e s u 2 32 CrryOu 3 b 3 A L U 3 R e s u 3 S e O v e r f o w Conro nes Funcon And Or Add Subrc Se on ess hn Lec 4.4

Rppe Crry Adder s Sow! A 4-b Adder: Cn you see he rppe? c = bc + c + b c2 = bc + c + b c2 = bbc + bc + bb + bc + c + b + b c3 = b2c2 + 2c2 + 2b2 c3 =... c4 = b3c3 + 3c3 + 3b3 c4 =... Grows exponeny wh he number of bs c hs 2^ erms Rppe crry dder s no fesbe for wde dders Lec 4.5 Crry-Lookhed Adder Observe h c(+) = g() + p()*c() where g() = ()*b() c = g + pc p() = () + b() c2 = g + pc c3 = g2 + p2c2 c4 = g3 + p3c3 c2 = g + pg + ppc c3 = g2 + p2g + p2pg + p2ppc c4 = g3 + p3g2 + p3p2g + p3p2pg + p3p2ppc Q: Dd we ge rd of rppe? Q: Fesbe. Why? Lec 4.6

Crry-Lookhed Adder b b 2 b2 3 b3 4 b4 5 b5 6 b6 7 b7 ALU P G ALU P G C C2 p g c + p + g + c + 2 Resu--3 Crry-ookhed un Resu4--7 C(+) = G() + P()*C() where C = c P = p3p2pp, P = p7p6p5p4 P2 = ppp9p8, P3 = p5p4p3p2 G = g3 + p3g2 + p3p2g + p3p2pg 8 b8 9 b9 b b 2 b2 3 b3 4 b4 5 b5 ALU2 P2 G2 ALU3 P3 G3 C3 C4 p + 2 g + 2 c + 3 p + 3 g + 3 c + 4 Resu8-- Resu2--5 G =... G2 =... G3 =... CrryOu Lec 4.7 Summry We cn bud n ALU o suppor he MIPS nsrucon se key de: use mupexor o seec he oupu we wn we cn effceny perform subrcon usng wo s compemen we cn repce -b ALU o produce 32-b ALU Imporn pons bou hrdwre of he ges re wys workng he speed of ge s ffeced by he number of npus o he ge he speed of crcu s ffeced by he number of ges n seres (on he crc ph or he deepes eve of ogc ) Crry ookhed offers fser ph hn wng for he crres rppe hrough 32 -b dders Lec 4.8