5.1.8 · D1 · HinglishInstruction Set Architecture (ISA)

FoundationsRISC-V extensions (M, A, F, D, V, C)

2,155 words10 min read↑ Read in English

5.1.8 · D1 · Hardware › Instruction Set Architecture (ISA) › RISC-V extensions (M, A, F, D, V, C)

Yeh page assume karta hai ki tumne parent page par koi bhi notation pehle nahi dekha. Hum har symbol ko earn karte hain pehle use karne se. Line one se shuru karo.


0. Sabse raw atom: the bit

Figure — RISC-V extensions (M, A, F, D, V, C)

Jab hum bahut saare boxes line up karte hain toh positions ko right se count karte hain, 0 se shuru karke. Sabse rightmost box position 0 hai, agla position 1 hai, aur aage bhi aise hi. Woh position number bit index kehlata hai.


1. Bits se number tak: place value

Har box ki ek weight hoti hai. Position ki value hoti hai. Ek row ko number ki tarah padhne ke liye, un sab boxes ki weights add karo jo 1 hold karti hain.

Figure — RISC-V extensions (M, A, F, D, V, C)

2. Word, register, aur names RV32I / RV64I

Yahi woh 32 aur 64 hain jo RV32I aur RV64I mein hain:

  • RV = RISC-V.
  • 32 ya 64 = har register mein kitne boxes hain.
  • I = Integer base — woh mandatory core jo 5.1.07-RISC-V-base-ISA define karta hai.

3. Hexadecimal: ek baar mein chaar bits ka shorthand

32 boxes likhna thaka dene wala hai. Hum unhe 4 boxes at a time group karte hain, kyunki 4 bits ke combinations hote hain, aur har combination ko ek single symbol 09 phir AF dete hain. Yeh hexadecimal ("base 16") kehlata hai, leading 0x ke saath likha jata hai.

Toh 0x80000000 hai 1000 phir saat 0000 groups = 32 ke leftmost box mein ek 1, baaki sab 0. Yeh picture yaad rakho — yeh parent page ke tricky multiply example ka star hai.


4. Signed vs unsigned: leftmost box ka matlab kya hai

Boxes ki same row ko do tarakon se padha ja sakta hai.

Figure — RISC-V extensions (M, A, F, D, V, C)

5. Kyun multiplying overflow kar sakti hai: the 64-bit product

Do 32-box numbers multiply karo aur answer ko 64 boxes tak ki zaroorat pad sakti hai. Ek single 32-bit register isse hold nahi kar sakta, toh hardware result ko split karta hai:

Yeh single fact parent page ke poore "why two results?" section ko explain karta hai — long multiplication ke apne column overflow karne se zyada kuch mysterious nahi hai.


6. IEEE 754: ek row of bits kaise fraction banta hai

Integers 1.75 store nahi kar sakte. F aur D extensions ek register ko 5.2.03-IEEE-754-floating-point layout use karke floating-point number ki tarah padhte hain. Bits ko teen fields mein cut kiya jata hai:

Figure — RISC-V extensions (M, A, F, D, V, C)

7. Atomic, core, aur cache line (A extension ke liye)

A extension bahut saare CPUs ke memory share karne ke baare mein baat karta hai. Teen plain-word terms:

8. "Vector" ka matlab kya hai (V ke liye) aur "compressed" (C ke liye)


Prerequisite map

bit 0 or 1

place value powers of two

word and register width

RV32I RV64I naming

hexadecimal shorthand

signed vs unsigned

M extension multiply and divide

IEEE 754 fields

F and D extensions

core cache line atomic

A extension atomics

scalar vs vector

V extension

instruction encoding size

C extension

RISC-V extensions menu


Equipment checklist

Bit kya hota hai aur exactly do states kyun?
Ek box jo 0 ya 1 hold karta hai; do states cleanly "voltage / no voltage" se map hoti hain.
Place value ka kya matlab hai?
Index par box (right se, 0 se count karke) worth hota hai; 1 boxes ki weights add karo.
[31:0] aur [63:32] kya select karte hain?
Low 32 boxes, aur 64-box row ke upper 32 boxes.
RV64I decode karo.
RISC-V, 64-bit registers, mandatory Integer base.
rd, rs1, rs2 kya roles play karte hain?
Destination register, read-source 1, read-source 2.
Ek hex digit kitne bits ke barabar hai?
Chaar bits ( combinations).
0x80000000 unsigned vs signed kya hai?
unsigned, signed (sirf top box set hai).
Two's complement mein top box sign kyun flip karta hai?
Uski weight ki jagah ban jaati hai.
32×32 multiply ko 64 bits kyun chahiye?
Product itna bada ho sakta hai ki 64 boxes chahiye; hardware isse upper (MULH) aur lower (MUL) mein split karta hai.
IEEE 754 ke teen fields ke naam batao.
Sign, exponent, mantissa.
Exponent se 127 kyun subtract karte hain?
Yeh bias hai; exponent ko unsigned store karne se simple comparators floats sort kar sakte hain, aur subtract karne se true exponent recover hota hai.
0.1 ek float mein exact kyun nahi hota?
Uska binary fraction forever repeat karta hai; 23 bits par truncate karne par ek chhoti si error reh jaati hai.
Atomic aur cache line define karo.
Atomic = uninterruptible all-or-nothing; cache line = woh memory chunk jise hardware coherence ke liye track karta hai.
Scalar vs vector?
Scalar = ek op par ek number; vector = ek saath numbers ki puri row par same op.