5.1.3 · D1 · HinglishInstruction Set Architecture (ISA)

FoundationsAddressing modes

1,946 words9 min read↑ Read in English

5.1.3 · D1 · Hardware › Instruction Set Architecture (ISA) › Addressing modes

Parent note padhne se pehle, tumhe uski language padhna aana chahiye. Ye page har ek symbol, box, aur word ko build karta hai jo wo use karta hai — bilkul scratch se. Upar se neeche padho; har idea sirf uske upar wale ideas par rely karta hai.


1. Ek bit, ek word, aur ek number

bits mein kitne distinct patterns fit ho sakte hain? Har bit count ko double kar deti hai, toh bits se patterns milte hain.

Figure — Addressing modes

bits se patterns milte hain; bits se milte hain — lagbhag char billion. Wo number, , exactly memory locations ki wo count hai jise parent note kehta hai ki hume point karne ki zaroorat ho sakti hai. Dekho Instruction Format ki kaise ek word ko fields mein kaata jaata hai.


2. Memory ek numbered boxes ki row ke roop mein

Figure — Addressing modes

3. Notation — "box ke contents"

Picture: box number pe point karo, use kholo, value padho.

Ye inside-out reading wahi poora mechanism hai jo baad mein indirect mode ke peeche hai (, aur operand hai ).


4. Registers aur notation

Figure — Addressing modes

5. Instruction fields aur

Figure — Addressing modes

6. Program Counter,


7. Dono homes ke beech "+" rakhna: EA kaise banta hai

Ab jaisi rule mein har symbol earn kar liya hai:


8. Memory accesses count karna


Prerequisite map

Bit and word

2 to the n patterns

Address space size

Memory box and address

Contents notation M of x

Register

Contents notation R in brackets

Effective Address EA

Instruction fields A and R

Program Counter PC

Addressing modes

Count memory accesses

Is page par sab kuch neeche ek hi node Addressing modes mein flow karta hai — parent topic.


Equipment checklist

Right side cover karo aur khud ko test karo. Agar koi bhi jawab fuzzy lage, toh parent note kholne se pehle woh section dobara padho.

bits mein kitne distinct patterns fit hote hain, aur kyun?
, kyunki har add ki gayi bit patterns ki number ko double kar deti hai.
Ek address aur ek box ke contents mein kya fark hai?
Address batata hai kaunsa box (uska number); contents batata hai andar kaunsi value hai.
ko plain words mein padho.
Us memory box mein stored value jiska address hai.
evaluate karo given aur .
— inside-out kaam karo: inner hai, phir .
ka matlab kya hai versus ?
wo value hai jo abhi register mein hai; sirf register ka naam hai.
CPU ko kya karne ke liye kehta hai?
Register ke andar ka number lo, use ek address ki tarah use karo, aur woh memory box padho.
Ek instruction ke andar aur kya hain?
ek number field hai (ek address ya ek chhota offset); ek register ka naam leta hai.
Wohi bits alag-alag cheezein kyun mean kar sakte hain?
Mode bits recipe select karte hain, toh ek full address ki tarah kaam kar sakta hai ya sirf ek register mein add hone wala offset.
kya hai aur PC-relative mode ise kyun use karta hai?
Program Counter current instruction ka address hold karta hai; usmein add karne se position-independent (relocatable) code milta hai.
Displacement mode mein , ke liye compute karo.
.
Ek operand expression se memory accesses kaise count karte ho?
Nested wrappers count karo: koi nahi = 0 trips, ek = 1 trip, do = 2 trips.

Recall Feynman one-liner

Memory numbered mailboxes ki ek street hai. Ek address ek house number hai; contents us andar ka mail hai. Square brackets ka matlab hai "woh mailbox kholo"; round brackets ka matlab hai "CPU ki apni desk par sticky note padho." Har addressing mode bas ek chhoti si recipe hai ye decide karne ke liye ki kaunsa mailbox kholna hai.