TIMED REVISION · 1-MINUTE PANIC SHEETS

Computer Organization & Architecture 10-Minute Rapid Revision

For the last few minutes before the exam hall: one core rule per topic, the formulas you must remember, and the traps that cost marks.

PANIC SHEET 01 · Machine Instructions, Addressing Modes & Datapath

Addressing Modes, Effective Address & Expanding Opcodes

Full Lesson →
CORE INVARIANT ANCHOR:

“Effective Address (EA) is the actual memory location accessed; always include instruction fetch memory cycle in total access count.”

Must-Remember Principles:
  • —Immediate: EA = None; 0 operand memory references.
  • —Direct: EA = Address field; 1 memory reference.
  • —Indirect: EA = Memory[Address field]; 2 memory references.
  • —Register Indirect: EA = [Register]; 1 memory reference.
  • —Relative: EA = PC + Offset; position-independent conditional branches.
  • —Indexed: EA = Base Address + Index Register; array traversal A[i].
  • —Expanding Opcode: Unused prefixes at level k expand by 2^(freed_field_bits) at level k-1.
Critical Exam Pitfalls:
  • —Never forget the memory access required to fetch the instruction code itself.
  • —PC-relative branch offsets are signed 2's complement numbers relative to the updated PC (pointing to the next instruction).
PANIC SHEET 02 · Machine Instructions, Addressing Modes & Datapath

Instruction Cycle State Machine & Datapath Timing Analysis

Full Lesson →
CORE INVARIANT ANCHOR:

“Single-cycle clock period equals the sum of delays along the longest instruction path (LOAD); multi-cycle clock equals max stage delay.”

Must-Remember Principles:
  • —Single-cycle clock = Sum of delays along the longest instruction path (LOAD).
  • —Multi-cycle clock = Delay of the slowest individual functional stage.
  • —Overflow Flag V: $V = C_{in} \oplus C_{out}$ at the most significant bit (MSB).
  • —Carry Flag C: Unsigned arithmetic out-of-range indicator.
  • —Sign Flag S: MSB of the result; indicates negative value in 2's complement.
Critical Exam Pitfalls:
  • —Do not confuse Carry (unsigned overflow) with Overflow V (signed 2's complement overflow). An operation can produce Carry=1 with Overflow=0 (e.g., adding two large unsigned numbers that do not violate signed bounds).
PANIC SHEET 03 · Computer Arithmetic, IEEE 754 & Booth's Algorithm

IEEE 754 Floating Point & Booth's Algorithm

Full Lesson →
CORE INVARIANT ANCHOR:

“IEEE 754 encodes (-1)^S * (1.M) * 2^(E-Bias) with Bias 127 (Single) and 1023 (Double); Booth shifts arithmetic right preserving MSB.”

Must-Remember Principles:
  • —Single Precision: Bias = 127; E has 8 bits, M has 23 bits.
  • —Double Precision: Bias = 1023; E has 11 bits, M has 52 bits.
  • —Subnormal numbers: E = 0, M != 0; value = (-1)^S * (0.M) * 2^(-126).
  • —Booth (Q_0, Q_-1): 10 -> Subtract & Shift; 01 -> Add & Shift; 00/11 -> Shift only.
  • —ARS preserves MSB sign bit.
Critical Exam Pitfalls:
  • —Never include the hidden 1 when writing the stored mantissa bits.
  • —For negative numbers in Booth's algorithm, always compute -M in two's complement before starting.
PANIC SHEET 04 · Computer Arithmetic, IEEE 754 & Booth's Algorithm

Restoring & Non-Restoring Division and Carry Lookahead Adders

Full Lesson →
CORE INVARIANT ANCHOR:

“Non-restoring division eliminates the restore addition cycle by adding divisor when remainder is negative; CLA generates carries in 2 gate levels.”

Must-Remember Principles:
  • —Restoring division: Subtract; if negative, restore by adding back and set Q_0 = 0.
  • —Non-restoring division: If A >= 0, shift & subtract; if A < 0, shift & add.
  • —CLA: $G_i = A_i B_i$ (generate), $P_i = A_i \oplus B_i$ (propagate).
  • —CLA Carry latency is constant 2 gate levels (AND-OR) after P and G are available.
Critical Exam Pitfalls:
  • —In non-restoring division, remember the final sign check on remainder A: if A is negative at the end of all steps, a final restore addition A = A + M is strictly required.
PANIC SHEET 05 · Memory Hierarchy, Cache Mapping & AMAT

Cache Memory: Direct, Associative, Set-Associative & AMAT

Full Lesson →
CORE INVARIANT ANCHOR:

“In set-associative caches, Set Index = log2(Capacity / (Block Size * k)); AMAT = T_L1 + M_L1 * (T_L2 + M_L2_local * T_MM).”

Must-Remember Principles:
  • —Direct: Line Index = log2(Lines); Tag = Address - Index - Offset.
  • —Fully Associative: Zero index bits; Tag = Address - Offset.
  • —k-way Set-Associative: Sets = Capacity / (Block Size * k); Set Index = log2(Sets).
  • —AMAT = T_L1 + M_L1 * (T_L2 + M_L2_local * T_MM).
  • —Global Miss Rate L2 = M_L1 * M_L2_local.
Critical Exam Pitfalls:
  • —Do not forget to count the Dirty bit in write-back cache tag directory size calculations.
  • —Cache capacity refers to DATA capacity; tag bits, valid bits, and dirty bits are additional hardware overhead.
PANIC SHEET 06 · Memory Hierarchy, Cache Mapping & AMAT

Cache Replacement, Write Policies & Memory Interleaving

Full Lesson →
CORE INVARIANT ANCHOR:

“Low-order memory interleaving maps consecutive memory addresses to parallel banks, reducing streaming latency to T_bank + (words - 1) * T_bus.”

Must-Remember Principles:
  • —Write-Through: Main memory always consistent; write buffer avoids CPU stalls.
  • —Write-Back: Writes to cache only; dirty bit tracks eviction flush to RAM.
  • —Low-Order Interleaving: Bank = Address mod m; sequential words map to parallel banks.
  • —Interleaved Latency: T_total = T_bank + (words - 1) * T_bus.
Critical Exam Pitfalls:
  • —High-order interleaving places consecutive words in the SAME bank, so it provides zero speedup for sequential array streaming.
PANIC SHEET 07 · Instruction Pipelining, Hazards & Performance

Instruction Pipelining: Stages, Speedup & Hazards

Full Lesson →
CORE INVARIANT ANCHOR:

“Pipeline clock period equals max stage delay plus latch overhead; full operand forwarding eliminates stalls for ALU-to-ALU dependencies.”

Must-Remember Principles:
  • —T_clock = max(Stage Delays) + Latch Delay.
  • —Ideal CPI = 1; Actual CPI = 1 + Stalls_data + Stalls_branch.
  • —RAW (Read-After-Write) is the only data hazard in in-order pipelines.
  • —Operand forwarding resolves ALU-to-ALU dependencies with 0 stalls.
  • —Load-Use hazard requires 1 stall bubble even with full forwarding.
Critical Exam Pitfalls:
  • —Do not forget latch delay when computing the pipelined clock period.
  • —Ensure register file write occurs in first half-cycle and read in second half-cycle before adding unnecessary bubbles.
PANIC SHEET 08 · Instruction Pipelining, Hazards & Performance

Branch Hazards, Dynamic Predictors & Branch Target Buffers

Full Lesson →
CORE INVARIANT ANCHOR:

“Branch penalty cycles equal the stages elapsed before target address and branch condition are resolved; 2-bit counter requires two errors to flip.”

Must-Remember Principles:
  • —Branch penalty = Stages elapsed before target address and condition are resolved.
  • —Resolving branch at ID stage gives 1 stall cycle; at EX stage gives 2 stall cycles.
  • —2-bit saturating counter states: 11 (Strongly Taken), 10 (Weakly Taken), 01 (Weakly Not Taken), 00 (Strongly Not Taken).
  • —BTB cache eliminates branch penalty completely on hit.
Critical Exam Pitfalls:
  • —Remember that the 2-bit counter requires two successive mispredictions to flip its prediction between Taken and Not Taken.
PANIC SHEET 09 · Control Unit Design, DMA & Interrupts

Microprogrammed Control Units & DMA Transfer Modes

Full Lesson →
CORE INVARIANT ANCHOR:

“Vertical microinstructions group mutually exclusive signals with ceil(log2(n+1)) bits per group; DMA cycle stealing slows CPU by Rate * T_bus.”

Must-Remember Principles:
  • —Horizontal microinstructions: 1 bit per signal; no decoder; high speed.
  • —Vertical microinstructions: Groups encoded with ceil(log2(n+1)) bits; requires decoders.
  • —Burst mode: CPU halted for the entire block transfer.
  • —Cycle stealing: DMA steals 1 bus cycle per data word; CPU slows by fraction = Rate * T_bus.
Critical Exam Pitfalls:
  • —Remember the +1 idle state when computing vertical field bit widths.
PANIC SHEET 10 · Control Unit Design, DMA & Interrupts

Interrupts, Daisy Chaining Priority & Bus Arbitration

Full Lesson →
CORE INVARIANT ANCHOR:

“Vectored interrupts supply vector address directly on the data bus; daisy chaining arbitrates device priority in serial hardware order.”

Must-Remember Principles:
  • —Vectored: Device supplies vector address directly over the bus to jump to ISR.
  • —Non-vectored: CPU jumps to fixed location and polls devices sequentially.
  • —Daisy chaining: Priority ordered by physical position closest to CPU.
  • —DMA slowdown % = Data Transfer Rate * Bus Cycle Time.
Critical Exam Pitfalls:
  • —Ensure matching units: If rate is in bytes/sec, multiply by bus cycle time in seconds per byte.