5.1.1 · HinglishInstruction Set Architecture (ISA)

CISC vs RISC philosophies

1,854 words8 min readRead in English

5.1.1 · Hardware › Instruction Set Architecture (ISA)


YEH debate exist hi kyun karti hai?

KYA cheez ne jawaab badal diya? Sasti memory + achhe compilers + yeh discovery ki fast simple hardware better pipeline karta hai.


Figure — CISC vs RISC philosophies

EK HI task ko woh ALAG tarah kaise execute karte hain

Task: A = A + B jahan A, B memory mein hain.


Core trade-off, first principles se derive kiya hua


Modern plot twist



Recall Feynman: ek 12-saal ke bachche ko samjhao

Socho LEGO se banana. CISC aise hai jaise kuch giant pre-built pieces hon — ek poora car door ek piece mein. Ek pakadna fast hai, lekin special pieces ka dabba bhaari hai aur unhe banane wali factory complicated hai. RISC aise hai jaise sirf tiny basic bricks hon. Usi door ke liye tumhe zyada bricks aur clear instructions chahiye, lekin bricks saste hain, super fast snap hote hain, aur tum kuch bhi bana sakte ho. Clever baat yeh hai: ek achhe instruction sheet (compiler) ke saath, bahut saari tiny bricks actually thodi giant lumpy ones se tezi se banati hain.


Forecast-then-Verify


Flashcards

CISC aur RISC kis sawaal ke alag-alag jawaab dete hain?
Complexity kahaan rahni chahiye — hardware mein (CISC) ya software/compiler mein (RISC).
RISC mein kaun si instructions memory access kar sakti hain?
Sirf LOAD aur STORE (load/store architecture); saari arithmetic register-to-register hoti hai.
Kya RISC mein "Reduced" ka matlab hai program mein kam instructions?
Nahi — usually program mein ZYADA instructions hoti hain; har instruction simpler hoti hai.
CPU time equation do.
CPU Time = N × CPI × T_c (instruction count × cycles per instruction × cycle time).
RISC larger N ke bawajood faster kyun ho sakta hai?
Kyunki woh CPI ko 1 ki taraf drive karta hai aur simple hardwired control + deep pipelining ke zariye cycle time chota karta hai, aur yeh gains higher N se zyada dominant hain.
Microcode kya hai aur kaun sa style isko rely karta hai?
Ek internal layer jo ek complex instruction ko micro-ops mein expand karti hai; classic CISC isko rely karta hai.
Modern x86 CPUs dono ko kaise blend karte hain?
Woh CISC instructions ko RISC-jaisi micro-ops (μops) mein decode karte hain jo ek RISC-style core par execute hoti hain.
Typical instruction length: CISC vs RISC?
CISC = variable length (x86: 1–15 bytes); RISC = fixed length (jaise 32-bit).
Fixed-length encoding RISC ki help kyun karta hai?
Instruction fetch/decode uniform aur predictable hoti hai, jisse pipelining simpler aur faster hoti hai.
Ek CISC ISA aur ek RISC ISA ka naam bolo.
CISC: x86 / VAX / 68k. RISC: ARM / MIPS / RISC-V.
Kya saare RISC ISAs mein ≥32 registers hote hain?
Nahi — yeh ek common goal hai (MIPS/RISC-V/ARMv8 mein 32 hain) lekin classic 32-bit ARM mein sirf 16 hain; defining traits hain load/store + fixed-length encoding.
CISC historically kyun aaya?
Mehengi/scarce memory + haath se likhi assembly ne dense, zyada kaam karne wali instructions ko prefer kiya.

Connections

  • Pipelining — RISC ka fixed-length, single-cycle design hi woh cheez hai jo clean pipelines possible banata hai.
  • Microcode and Micro-operations — woh mechanism jo CISC internally use karta hai aur x86 RISC-jaisa kaise banta hai.
  • CPU Performance Equation — N × CPI × Tc framework jis par yeh poora trade-off tikaa hai.
  • Addressing Modes — CISC ke rich modes vs RISC ka minimal set.
  • Compiler Optimization — RISC jaanbujhkar complexity yahaan shift karta hai.
  • x86 vs ARM — is debate ka modern real-world instance.
  • Instruction Encoding — fixed vs variable length formats.

Concept Map

hardware answer

software answer

motivated

motivated

uses

allows

enables

requires

uses

enables

needs

shifts work to

Where should complexity live?

CISC complex ISA

RISC reduced ISA

1970s tiny costly memory + hand assembly

1980s cheap memory + smart compilers

Microcode multi-cycle instr

Memory operands in arithmetic

Dense code, fewer bytes

Load-store architecture

Hardwired control

Easy pipelining

Many registers

Compiler