Autumn 2024 — Fully Solved

Answer all three. Reveal after attempting.

Q1 (CO1) — IAS & Abstraction

1aIAS: read a value from address X and write double the value back to X. (Hint: LSH.)
1bbigIf IAS memory is increased by 2ⁿ times, what is the new address size? Max n for which instruction size is unchanged?
1cExplain how abstraction helps programmers cope with complexity (with a diagram).

Q2 (CO3) — Performance & Amdahl

2abigCPI: A/B/C/D = 1/2/3/4. Seq1 = 4/3/2/1, Seq2 = 3/1/1/3. Which runs more instructions? Which is faster? CPI of each? Verify.
2bbigFP = 40% of time, sped up by factor n, overall speedup = 1.66. Find n.
2cProve that as Speedup_enhanced → ∞, overall speedup is bounded by 1/(1−Fraction_enhanced). Illustrate graphically.

Q3 (CO2) — MIPS

3abigTranslate to MIPS with bne, then to machine code: if (i!=j) h=i+j; else h=i-j; (f..j = $s0..$s4).
3bAddress of the last word in MIPS-64 (everything similar to MIPS-32).