Docsity

Computer Organization & Architecture (COA) Guide | Solved PYQs, Summaries of Computer Architecture and Organization

Toggle sidebar
bg1
COA — Complete Exam Notes
COMPUTER ORGANIZATION &
ARCHITECTURE
Complete Exam Notes
B.Tech — Computer Science / IT / AI & DS
Standard University Curriculum Edition • 2026–27
Concepts • Solved Examples • High-Priority Topics • Revision
NOTE ON SOURCE BASIS: built on the standard 5-unit COA syllabus taught across Indian engineering
universities (Basic Organization → CPU Design → Memory Hierarchy → I/O Organization → Pipelining). Not
copied from any single university's official document — cross-check against your own handout.
Page 1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download Computer Organization & Architecture (COA) Guide | Solved PYQs and more Summaries Computer Architecture and Organization in PDF only on Docsity!

COMPUTER ORGANIZATION &

ARCHITECTURE

Complete Exam Notes

B.Tech — Computer Science / IT / AI & DS

Standard University Curriculum Edition • 2026–

Concepts • Solved Examples • High-Priority Topics • Revision NOTE ON SOURCE BASIS: built on the standard 5-unit COA syllabus taught across Indian engineering universities (Basic Organization → CPU Design → Memory Hierarchy → I/O Organization → Pipelining). Not copied from any single university's official document — cross-check against your own handout.

How To Use These Notes Same sequence as your DBMS guide: first reading for understanding, then concept revision, then high-priority topics, then practice, then the cheat sheet alone on the last day. Syllabus Map Uni t Topics Difficulty Priority I Number Systems, Computer Arithmetic, Basic Organization Medium High II CPU Design, Instruction Formats, Addressing Modes, Control Unit Hard Very High III Memory Hierarchy, Cache Mapping, Virtual Memory Hard Very High IV I/O Organization, Interrupts, DMA Medium High V Pipelining, Hazards, Parallel Processing Hard High

Units II and III carry the heaviest numerical load — addressing mode calculations and

cache mapping problems are the most common full-mark questions across COA papers.

Section 3 — Basic Computer Organization Fig 1.1 — The five functional units: Input, Output, Memory, CPU (ALU + Control Unit + Registers), and Secondary Storage

Key registers every paper expects you to name

Register Full form Purpose PC Program Counter Holds address of the next instruction to fetch IR Instruction Register Holds the instruction currently being executed MAR Memory Address Register Holds the address to be accessed in memory MDR/MBR Memory Data/Buffer Register Holds data being transferred to/from memory AC Accumulator Holds intermediate arithmetic/logic results Section 6 — Important Questions (Unit I)

HIGH PRIORITY

  • Convert a given decimal number to binary, octal, and hexadecimal.
  • Perform binary subtraction using 2's complement and explain the overflow detection rule.
  • Draw and explain the basic organization of a computer with all functional units.

MEDIUM PRIORITY

  • Differentiate between 1's complement and 2's complement representation.
  • Explain the function of PC, IR, MAR, and MDR.

UNIT I — 10-Minute Revision

  • 2's complement: invert + 1 — single representation of zero, same adder for +/−
  • Overflow: only when same-sign operands give an opposite-sign result
  • Five functional units: Input, Output, Memory, CPU, Secondary Storage
  • PC = next instruction address; IR = current instruction; MAR/MDR = memory address/data buffer

Solved example: If R2 = 2000 and the instruction is MOV R1, 50(R2) using indexed addressing, the effective address = 2000 + 50 = 2050 — the CPU fetches the operand from memory location 2050. Exam Tip: Indirect addressing needs two memory accesses (one to get the address, one to get the data); direct addressing needs only one — this comparison is a frequent 2-mark question. Section 3 — RISC vs CISC Feature RISC CISC Instruction set Small, simple, fixed-length Large, complex, variable- length Execution Mostly single clock cycle per instruction Multiple cycles per instruction Addressing modes Few Many Control unit Hardwired (faster) Usually microprogrammed Examples ARM, MIPS x86 (Intel/AMD) Section 4 — Control Unit Design

  • Hardwired Control: control signals generated by fixed logic circuits (combinational + sequential logic) — fast, but hard to modify once built
  • Microprogrammed Control: control signals stored as microinstructions in a control memory (control store), read out sequentially — slower, but flexible and easy to update/debug Exam Tip: 'Which is faster, which is more flexible' is the standard framing — hardwired wins on speed, microprogrammed wins on flexibility and ease of design changes. Section 6 — Important Questions (Unit II)

HIGH PRIORITY

  • Explain all addressing modes with an example and effective address calculation for each.
  • Differentiate between RISC and CISC architecture.
  • Explain hardwired and microprogrammed control unit design with a comparison.

MEDIUM PRIORITY

  • Differentiate between zero, one, two, and three-address instruction formats.
  • Convert a given infix expression to postfix and show zero-address code execution.

UNIT II — 10-Minute Revision

  • Instruction formats: zero/one/two/three-address — differ in operand count and where results go
  • Addressing modes: memorize the effective-address formula for each, not just the name
  • RISC = simple, fixed-length, hardwired, fast; CISC = complex, variable-length, microprogrammed, flexible
  • Hardwired = speed; Microprogrammed = flexibility

Section 2 — Cache Mapping Techniques Fig 3.2 — Direct mapping: each memory block maps to exactly one specific cache line Technique Rule Trade-off Direct Mapping Block i → line (i mod number of lines) Simple, fast, but causes conflicts even when other lines are free Fully Associative A block can go into any cache line No conflict misses, but needs to search every line (slow, expensive hardware) Set-Associative Block → a specific set, then any line within that set Middle ground — most real processors use 2-way, 4- way, or 8-way set- associative caches Exam Tip: 'Why not just use fully associative caches everywhere' is a common conceptual question — the answer is the search cost: checking every single line in parallel needs a comparator per line, which becomes too expensive as cache size grows. Section 3 — Cache Performance Formula: Average Memory Access Time (AMAT) = Hit time + (Miss rate × Miss penalty) Solved example: Hit ratio = 90%, hit time = 2 ns, miss penalty = 20 ns. Find AMAT. Solution: AMAT = 2 + (0.10 × 20) = 2 + 2 = 4 ns Exam Tip: Always convert hit ratio to miss rate (miss rate = 1 − hit ratio) before plugging into the formula — mixing these up is the single most common numerical mistake in this topic.

Section 4 — Virtual Memory & Page Replacement Definition: Virtual memory lets a program use more address space than physically available RAM, by keeping only active pages in RAM and the rest on disk, swapped in on demand (demand paging).

Page replacement algorithms

  • FIFO: replace the page that has been in memory the longest, regardless of usage
  • LRU (Least Recently Used): replace the page that hasn't been used for the longest time — approximates future behavior using the past
  • Optimal: replace the page that won't be used for the longest time in the future — theoretical best case, used only for comparison since it needs future knowledge Solved example — LRU: Reference string: 1, 2, 3, 1, 4 with 3 frames. Frame state after each step: [1] → [1,2] → [1,2,3] → [1,2,3] (hit) → replace least recently used (2) → [1,3,4]. Exam Tip: Belady's Anomaly — more frames sometimes causing MORE page faults under FIFO — is a favorite trick question specifically because it does NOT happen with LRU or Optimal, only FIFO. Section 6 — Important Questions (Unit III)

HIGH PRIORITY

  • Explain the memory hierarchy and the principle of locality of reference.
  • Explain direct, associative, and set-associative cache mapping with examples.
  • Calculate AMAT given hit ratio, hit time, and miss penalty.
  • Solve a page replacement problem using FIFO and LRU for a given reference string and frame count.

MEDIUM PRIORITY

  • What is Belady's Anomaly and which algorithm is immune to it?
  • Differentiate between paging and segmentation. UNIT III — 10-Minute Revision
    • Hierarchy exists because of locality of reference — fast/small/expensive on top, slow/large/cheap at bottom
    • Direct mapping: fixed line, fast, conflict-prone; Fully associative: any line, no conflicts, costly search; Set-associative: middle ground
    • AMAT = hit time + (miss rate × miss penalty) — miss rate = 1 − hit ratio
    • FIFO / LRU / Optimal page replacement — only FIFO suffers Belady's Anomaly

Section 3 — DMA (Direct Memory Access) Why it exists: Even interrupt-driven I/O still routes every single data word through the CPU. For high-speed devices (disk, network) transferring large blocks, this wastes CPU cycles that could run other programs — DMA lets a dedicated controller move data directly, only interrupting the CPU once per full block instead of once per word.

DMA transfer steps

    1. CPU sets up the DMA controller: source address, destination address, and word count
    1. CPU continues executing other instructions
    1. DMA controller takes control of the system bus (cycle stealing) and transfers data directly between device and memory
    1. DMA controller interrupts the CPU only once, after the entire block transfer is complete Exam Tip: 'Cycle stealing' is a specific keyword examiners look for — it refers to the DMA controller borrowing bus cycles from the CPU during a transfer, not the CPU actively participating in each word transfer. Section 6 — Important Questions (Unit IV)

HIGH PRIORITY

  • Compare Programmed I/O, Interrupt-Driven I/O, and DMA in terms of CPU involvement.
  • Explain how DMA works, including the concept of cycle stealing.
  • Explain vectored interrupts and daisy chaining for handling multiple interrupt requests.

MEDIUM PRIORITY

  • Differentiate between maskable and non-maskable interrupts.
  • What is polling and what is its major drawback? UNIT IV — 10-Minute Revision
    • CPU overhead: Programmed I/O (highest) > Interrupt-Driven > DMA (lowest)
    • Interrupts: hardware/software, maskable/non-maskable
    • Multiple interrupt handling: Polling (slow) → Daisy Chaining (priority order) → Vectored (fastest)
    • DMA: CPU sets up transfer once, controller does the rest, interrupts CPU only at completion (cycle stealing)

UNIT V: Pipelining & Parallel Processing

What you'll learn

  • What instruction pipelining is and why it improves throughput
  • The three types of pipeline hazards and how each is resolved
  • Flynn's classification of parallel architectures
  • Basic multiprocessor organization Section 1 — Instruction Pipelining Definition: A technique that overlaps execution of multiple instructions by splitting instruction processing into stages, so a new instruction can enter the pipeline before the previous one finishes. Fig 5.1 — Classic 5-stage pipeline: IF (Fetch), ID (Decode), EX (Execute), MEM (Memory access), WB (Write back) Speedup formula: Ideal speedup with k stages and n instructions ≈ k, as n grows large. Exact formula: Speedup = (n × k) / (k + (n−1)). Solved example: 5-stage pipeline, 100 instructions. Time without pipelining = 100 × 5 = 500 cycles. Time with pipelining = 5 + (100−1) = 104 cycles. Speedup = 500/104 ≈ 4.8×. Section 2 — Pipeline Hazards Hazard type Cause Common fix Structural Hazard Two instructions need the same hardware resource at the same time Duplicate hardware (e.g., separate instruction/data memory) Data Hazard An instruction depends on the result of a previous instruction still in the pipeline Forwarding/bypassing, or pipeline stalling Control Hazard A branch instruction changes Branch prediction, delayed

UNIT V — 10-Minute Revision

  • Pipelining overlaps instruction stages — speedup approaches k (number of stages) for large n
  • Structural hazard = resource conflict; Data hazard = dependency on unfinished result; Control hazard = branch uncertainty
  • Forwarding fixes data hazards; branch prediction fixes control hazards
  • Flynn: SISD (classic), SIMD (GPU), MISD (rare), MIMD (multi-core — your own laptop)

High-Priority Study Topics — Full Subject

No previous-year paper was supplied for this edition — nothing here is a guaranteed

question. These are flagged as high-priority because of how structurally central they are

to COA courses generally. Swap in your own college's actual PYQs the moment you have

them.

Topic Unit Why it's high-priority Addressing modes + effective address calc II Near-universal numerical question Cache mapping techniques

  • AMAT III Most common full-mark numerical question in the subject Pipeline hazards + speedup calculation V Standard long-answer combining theory and numerical RISC vs CISC II Very common theory/comparison question DMA and cycle stealing IV Frequently tested conceptual question 2's complement + overflow detection I Common opening numerical question

Formula Sheet

  • AMAT: Hit time + (Miss rate × Miss penalty), where Miss rate = 1 − Hit ratio
  • Pipeline speedup: (n × k) / (k + (n−1)), approaches k for large n
  • 2's complement: invert all bits, then add 1
  • Direct-mapped cache line: block number mod total number of cache lines

Rapid-Fire Quiz (20 Questions) Attempt without looking back. Answers on the next page.

  1. Which number representation has only one representation for zero and simplifies subtraction to addition?
  2. MCQ: PC stands for (a) Program Control (b) Program Counter (c) Processor Cache (d) Priority Code
  3. What is the effective address formula for indexed addressing?
  4. Name the two control unit design approaches.
  5. MCQ: Which is faster but less flexible? (a) Microprogrammed (b) Hardwired (c) Both equal (d) Neither
  6. What does locality of reference explain the need for?
  7. In direct mapping, block i maps to which cache line?
  8. Which cache mapping technique has zero conflict misses but the highest search cost?
  9. MCQ: DMA reduces CPU load by (a) increasing clock speed (b) transferring data without CPU involvement per word (c) removing memory (d) using more registers
  10. What is 'cycle stealing'?
  11. Name the three types of pipeline hazards.
  12. Which hazard is fixed by forwarding/bypassing?
  13. Which hazard is fixed by branch prediction?
  14. MCQ: SIMD stands for (a) Single Instruction Single Data (b) Single Instruction Multiple Data (c) Multiple Instruction Single Data (d) Multiple Instruction Multiple Data
  15. Give one real-world example of MIMD architecture.
  16. Overflow in 2's complement addition occurs when?
  17. What is the major drawback of programmed I/O?
  18. Which interrupt-handling method lets the device supply its own service-routine address?
  19. Which page replacement algorithm can suffer Belady's Anomaly?
  20. What does RISC prioritize that CISC does not?