Summer 2025 Final β€” Solved

Full marks 30. Q1 arithmetic, Q2 pipelining, Q3 cache β€” the standard skeleton. Try each part before revealing.

Q1 β€” Arithmetic CO3

1abig(a) Devise the multiplication algorithm to multiply two n-bit integers. Estimate its time and space complexity. [4]
1bsmall(b) Explain overflow and how it can be detected during addition and subtraction. [3]
1csmall(c) Diagram the IEEE single- and double-precision floating-point formats. [3]

Q2 β€” Pipelining CO3

2abig(a) Explain and exemplify a structural hazard, then discuss its solution. [4]
2bbig(b) 5-stage pipeline (IF,ID,EX,MEM,WB); each stage 3 ns except MEM = 4 ns; 1000 instructions. (i) speedup vs single-cycle (ii) throughput increase (iii) latency decrease. [6]

Q3 β€” Memory & Cache CO3

3abig(a) Diagram a direct-mapped cache with capacity 4096 bytes and block size 16 bytes, 32-bit address. [4]
3bsmall(b) How many total bits are required for the cache in Q3(a)? [3]
3csmall(c) A cache has 2^n entries. How many degrees of associativity are possible? Which n-values give direct-mapped or fully associative? [3]