CSI 312 Midterm with Solution, Spring 2011

American University of Science and Technology · Computer Architecture · 7 pages · Dr. Abbas Tarhini · with solution

All CSI 312 files
CSI 312 Midterm with Solution, Spring 2011, page 1

Stuck on a question? A tutor can walk you through it.

CSI 312 Midterm with Solution, Spring 2011, page 2 CSI 312 Midterm with Solution, Spring 2011, page 3 CSI 312 Midterm with Solution, Spring 2011, page 4 CSI 312 Midterm with Solution, Spring 2011, page 5 CSI 312 Midterm with Solution, Spring 2011, page 6 CSI 312 Midterm with Solution, Spring 2011, page 7

More CSI 312 files

Show the text of this exam
Question #1 (10 The performance of a Co, which execute: that application? Pee C5 ¢ * Qh eCatNa ce To enhance the perfory (Ingpease or De¢rea; puter A Is 5 time: 8 better than the performance o * Biven application in 25 se 4 ey Conds, How long will computer A nee nee of computer B, what should we do with the following (a POLED SE lockyele time b dre cede Ce nytiberorclock cycles in a program \ 5 Sees shatter f instructions in progam 4 Sck sitio re Pm i Ta instruction executed per second ‘Question #2 (10 points); puter B, dto run a Design your own instruction set architecture to execute the following operation assuming that A, B, C, D & G are 16-bits and they are all in main memory, (Show your work in details) A= (B+C) +(D-G*3) 1) Draw your design showing al st] Tne monte I components and architectural specifications (Explain). epecahwu | cloek cy le ¢ fOP Ki ,Rs 5u6 Rayks Li Ria Hele Li gat WA Load Ky, tL a= ame | Register-Memory? 2) What type of architecture is your machine: Stack, Accumulator, Register-Register, tas Coir Repy thas ri Pub Phal s Seine coaperh f y Leary ; et CY ht Ripigher.. weimory tar Sls “Sat |The Vefructvu te A lotr | ha fo the aa 5 for reps te 3 bite fac wemicd ren ‘The four arithmetic instructions are executed on the following datapath: 10 bite NAddR,A,B ; ReA+B UsubR, BA ; ReA-p B)MuIR,A,B ; R<BeA U)MUIR,A,B ; RAB What is the value of the result register R after the completion of each operation, for the following values of registers A and B? (All values are represented using 2’s complement notation) a) A=-17,B=30 b) A= 105, B= -126 ©) A= 10000000, B = 00000001 E(t) + C= 99OrNIIO & | 000 Wo clay 10\ ooo as fflow——_ over flau 7 #= O10 1001) Geel 000) SON I) (lito 104 2) CetEr four 4) What is the average CPI for the program running on Byblos? ‘ Los = 40 a CPT = Hof okey = a aa twsdru 1) PP a 5) Ifthe clock frequency is 3 GHz, how long will this program take to. Qusstion HS (50 points; We designed and built a computer called Byblos, a register-register based computer, with the following specifications; An 8:bit address bus An 8-bit data bus Memory width is 8-bits A register file containing 8 registers Yo) fs All registers in the processor are 8-bits Data is represented using 2's complement. Bus !) Execute the following program and show the resulting changes in the registers & in memory: LOAD Ri, MLO LOAD R2, ML2 MUL RO, RI ADD R2,RO MUL Ra, R3 ADD RS, R6 STORE R4, ML6 gister File: Memory: Op-code & Timing Table: Location | Content Location, Mnemonic Operation Clock 0 00000100 0 0000 al _| Cycles _| 1} 00000000 = Tn Rd= Rd + Rs 2 2 00000001 00001000 | Rd Rd * Rs 6 3 | olololor ~ | 00000000 Rd = [ML] 8 4 00000001 00 0 | STORE Rd, ML_| [ML] = Rd 8 5 01000000 | 6 | 01000001 ~ "00000000 00000000 | 90000000_} 10000000 00000000 Register Location running on Sidon? *Ys What is the execution time of the program above ma linp iy bokes 6 elk cycles Pee ¢ vs Trepro ut rept buy 3, ao U tak Aclok thin th tobwl clock wel nupctir will be } we felxs + 9 2~ Ind <a), D) we WG bao Sedov willbe? SA =3a, (07% wand 3x(03 3 = 32% piosewnds 7) Ifthe clock cycle time of Sidop.is 25% that of Dbl What is the execution t}m mee n program abovs on Sidon? Casswmerny Huot total numnube vA lock eye} S 39) o wer the clark cych tre of Sodan ps 16 Ya Hood opi lly D> th bo ckKrafe of Srdown wr be FH Hot of Sybler rr) ‘ hontwe toll (umbewofh cy clr — uP) Ham 3 aed} Miah palck eal « of Codon O,45%3 x09 Di x (0" $peunds= 32. pico sewnd ASS Pr Ly 8) Compare the performance of running this program on Sidon vs, Byblos, which processor is faster and by what factor? (use the results of & 7) Uns, = 2G eee Tirgoter ho/ 2