4.1.3 · HinglishComputer Architecture (Deep)

ISA (Instruction Set Architecture) — RISC vs CISC

2,242 words10 min readRead in English

4.1.3 · Coding › Computer Architecture (Deep)


ISA KYA hai?


RISC vs CISC exist kyun karta hai? (historical why)


Defining feature: load/store rule


Figure — ISA (Instruction Set Architecture) — RISC vs CISC

Trade-off, precisely (derivation, dump nahi)


Side-by-side cheat table (active-recall friendly)


Common mistakes (Steel-manned)


Flashcards

ISA kya hai?
Woh abstract hardware–software contract: instructions, registers, addressing modes, aur data types jo ek processor software ko expose karta hai (is baat se independent ki chip physically kaise bani hai).
ISA vs microarchitecture?
ISA = visible interface/"menu" (e.g. x86-64); microarchitecture = internal implementation/"kitchen" (e.g. Intel ka vs AMD ka same ISA ka design).
RISC vs CISC mein sabse gehri ek difference?
Complexity kahan rehti hai — CISC use hardware mein dhakelta hai (fat instructions); RISC use compiler/software mein dhakelta hai (simple instructions).
Load/store architecture define karo.
Arithmetic/ALU instructions sirf registers par operate karti hain; memory sirf explicit LOAD aur STORE instructions ke zariye access hoti hai. (RISC hallmark.)
Iron Law of processor performance batao.
Time = IC × CPI × T_cycle (instruction count × cycles per instruction × clock period).
Derive karo ki Iron Law ke units kyun kaam karte hain.
(instr/prog)·(cyc/instr)·(s/cyc): instr aur cyc cancel hote hain → s/prog = total CPU time.
CISC Iron Law ka kaun sa factor reduce karta hai, aur iska kya cost hai?
IC reduce karta hai; cost hai zyada CPI aur hard-to-shrink clock period.
RISC kaun se factors favor karta hai?
Low CPI (~1 via pipelining) aur chhota T_cycle; zyada IC accept karta hai.
Fixed-length encoding RISC ko kyun help karta hai?
Uniform instructions decode aur pipeline aasaani se hoti hain → low CPI aur faster clock.
"RISC" ka common galat padhna kya hai?
Yeh sochna ki iska matlab hai ISA mein kam instructions; actually matlab hai har instruction ki reduced complexity.
Modern x86 CPUs line ko kaise blur karte hain?
Woh CISC instructions ko RISC-jaise micro-ops (µops) mein decode karte hain aur unhe RISC-style pipeline mein chalate hain — baahir CISC, andar RISC.
Do RISC ISAs aur do CISC ISAs?
RISC: ARM, RISC-V (MIPS, SPARC bhi). CISC: x86/x86-64, VAX (System/360 bhi).

Recall Feynman: ek 12-saal ke bache ko samjhao (hidden — pehle khud try karo!)

Socho ki tum ek robot ko sandwich banane ke instructions de rahe ho.

  • CISC robot: tum kaho "sandwich banao!" — ek badi command. Robot ke paas bahut saari built-in machinery hai saari chhoti steps figure out karne ke liye. Tumhare liye chhota, complicated robot.
  • RISC robot: tumhe kehna padega "bread uthao… butter lagao… cheese daalo… bread band karo." — bahut saari tiny commands. Robot simple hai aur har chhoti step super fast karta hai, lekin tum (compiler) ko zyada soochna padhta hai aur zyada bolna padhta hai. Koi "best" nahi hai — yeh depend karta hai ki tum ek clever robot chahte ho ya ek clever instructor. Aur ISA bas un words ki list hai jo robot samajhne ka waada karta hai.

Connections

  • Microarchitecture vs ISA — ISA ke neeche ka implementation layer.
  • Pipeliningkyun RISC fixed-length, single-cycle-shaped instructions chahta hai.
  • CPI and the Iron Law of Performance — woh equation jo trade-off quantify karti hai.
  • Microcode — CISC ki complex instructions internally steps mein kaise tooti jaati hain.
  • Compilers and Code Generation — jahan RISC apni complexity dump karta hai.
  • Addressing Modes — CISC ka rich set vs RISC ka minimal set.
  • Registers and the Register File — load/store ko kai registers kyun chahiye.
  • Caches and Memory Hierarchy — load/store discipline memory speed ke saath interact karta hai.

Concept Map

independent of

one ISA to many

split into

core tradeoff

packs into hardware

pushes into compiler

caused by

caused by

defined by

ALU works

allows

enables

ISA contract HW-SW

Microarchitecture

RISC vs CISC philosophy

Where complexity lives

CISC complex

RISC reduced

1970s tiny memory + hand assembly

1980s good compilers + pipelining

Load-Store rule

Registers only

Memory operands in arithmetic

Easy pipelining fixed-length