You are on page 1of 3
(CSE230/BBE230 Cemputer Orga ‘Midterm Exam 3, November 9°, ‘Arizona State University Rates |. The exam i open book and open notes, you may use your laptop to acess the lecture notes. However, you are not allowed to se your laptop for communication or Internet acces (eno email, no chatting, no Google searet, 2. Work on ll the problems, They add up to 100 points tot 3, Whenever appropriate, you should try to show how you solved the problem (eg, writing down iermediate steps leading to Your final answer) instead of supplying omy the final answer, so that you ‘may eam paral credit even your final answer is incorrect, 4, Your answers must be legible and organized. Write on both sides ofthe papers if you need more space. jon & Assembly Language Programming 2010 Student Name: ASU ID: 1.5 points) Ia memory location 0300100000, there isa word (0011 1911 0110 1000 0100 4900 0000 0000 ‘What does i represent if tis (2) A MIPS instruction? (6) A singl-precison floating-point number in EE 754 format? (Note: For Part (b), itis accopable if your answer contains an expression thal leads tothe final solution even if you do not cary out the caleulation. Fg. ifthe correct answer is nw yu jst state Ua the anes is (1.000)* 2°, you wl til geal the ered.) (a) Check the opeode of the instruction from the book. 001110 > This is the first field for xori, Next 5 bits correspond to, Next five to rt, The last 16 bits correspond to Imm field. Solution: — xori $8, $ 27, 0x4000 Or, __xori $10, $ki., 0x4000 (0x40 16384 in decimal representation. (b)S=0 (sign bit > 4) Exp = 118~ 127 Fract=2' +27 +2442" Number = +(1.11010001):* 2” GI +24 2242+ 27 2? =(1.814453125)* 2° 0.00354 2. 35 point) Look athe following instruction sequence ‘add $1, $2, $3, ‘addi $1, $1, 32 Ww $2.4(81) add $1, $2, $3, (1) Use a traditional multple-clock-yclepipetine diagram to show wiy there are data hazards in & pipeline with 5 stages IF, ID, EX, MEM, and WB, (2) Use both forwarding and salto resolve the hazards so that the S.stge pipeline results for the instructions (ilutrate your solution using the traditional Pitine dagen). cycles 32 MR a ae ode $1, 42,93 VRID Be Mie IM rey afer 5. earl adds $1, $1, 32 i ™ wil arts efor is = Iw $2, 441) Ee I ee gap hend alk $1, $3 Oe AB $e ready after 42 ruded bef vig feeeietiey eh og 1s SH D A028 ab wa sald $1, By BE iF wNexy WB “Srewting wi, 44) iF ap Me ee odd $1, $293 jp Rw MWB “Stal 5. G0 points) The following figure show the pipelined dataputn with contro signals this is Figure 4.51 ‘rom the textbook) except that two locations are marked witha red". Describe in words what negative ‘pct the following situations will have on te datapath, compared withthe working unmodified version. (ite si "ow" of "doasseod” left tothe X at location I pitt si no signal eax be passed into the addr in that location. x CD TS 1 gts Hecke 0, He rrr Sile conmot be written back, Hence any Dnvtrnction thnk naads Ho wile back to a replay wotit werk properly. Bat, gs, "su" cow 47H! work a> The oolley vil next Ho location "2" 49 heed For compulle ny branch trigk neldvesses . E52" is at, branch tugat addiessegd wont be properly. compute , nel Ths branch tmstractions li met werk. Buk, °., VadA” sti[ works. t 2 3 | Tot ae] as[ ae | 00 z 7 3

You might also like