CPU Registers – रजिस्टर | Types, Functions & CPCT Complete Notes
CPU Registers are very small and extremely fast storage locations used by the CPU to temporarily hold data, instructions, addresses, and intermediate results during processing.
CPU Registers CPU के अंदर/उससे directly associated बहुत छोटी और अत्यंत तेज storage locations होती हैं। इनमें processing के दौरान data, instructions, memory addresses और intermediate results temporarily रखे जाते हैं।
Registers CPU को तेजी से काम करने में मदद करते हैं क्योंकि CPU को हर छोटे operation के लिए main memory (RAM) से data लेने की आवश्यकता नहीं होती।
🧠 CPCT Trick
Register = CPU की सबसे तेज छोटी Temporary Storage
1. Why Are Registers Needed?
CPU को लगातार instructions और data पर काम करना होता है। यदि हर operation के लिए CPU को RAM से data लेना पड़े, तो processing comparatively slower हो सकती है।
Registers CPU के पास बहुत fast working locations उपलब्ध कराते हैं।
Simple Example
मान लीजिए CPU को calculate करना है:
25 + 15
Processing के दौरान values और intermediate result registers में रखे जा सकते हैं और ALU उन पर operation कर सकता है।
Data → Registers → ALU → Result
2. Important CPU Registers
Competitive exams में निम्न registers सबसे महत्वपूर्ण हैं:
- Accumulator (ACC)
- Program Counter (PC)
- Instruction Register (IR)
- Memory Address Register (MAR)
- Memory Data Register (MDR)
- Stack Pointer (SP)
- Status/Flag Register
- General Purpose Registers (GPRs)
Important: Register names and exact functions can vary between CPU architectures. The descriptions below represent common textbook/architecture concepts used in computer fundamentals exams.
3. Accumulator – ACC
Accumulator is a register commonly used to hold operands and intermediate or final results of arithmetic and logical operations.
Accumulator एक register है जिसका उपयोग arithmetic और logical operations के दौरान data तथा intermediate/final results को temporarily रखने के लिए किया जाता है।
Example
यदि:
10 + 20 = 30
तो operation के दौरान values या result accumulator में रखा जा सकता है, depending on the CPU architecture.
🧠 CPCT Trick
ACC = Arithmetic Calculations
Accumulator → Calculation/Result
4. Program Counter – PC
Program Counter (PC) stores the address of the next instruction to be fetched/executed.
Program Counter अगले instruction के memory address को रखता है जिसे CPU को fetch करना है।
Example
यदि अगला instruction memory location:
2050
पर है, तो PC में उस instruction का address हो सकता है।
Instruction fetch होने के बाद PC सामान्यतः अगले instruction की ओर update होता है।
🧠 CPCT Trick
PC = Program का अगला Address
⭐ Most Important
PC → Address of Next Instruction
5. Instruction Register – IR
Instruction Register (IR) holds the instruction currently being decoded or executed by the CPU.
Instruction Register उस instruction को temporarily hold करता है जिसे CPU वर्तमान में decode/execute कर रहा होता है।
Instruction Cycle
Fetch → Decode → Execute
Fetch के बाद instruction को IR में रखा जा सकता है ताकि CPU उसे decode और execute कर सके।
🧠 CPCT Trick
IR = Instruction Register = Current Instruction
6. Memory Address Register – MAR
MAR (Memory Address Register) holds the address of the memory location that the CPU wants to access.
MAR उस memory location का address रखता है जिसे CPU access करना चाहता है।
Example
यदि CPU को memory location:
5000
से data पढ़ना है, तो उस location का address MAR में रखा जा सकता है।
🧠 CPCT Trick
MAR = Memory Address
बस याद रखें:
MAR → Address
7. Memory Data Register – MDR
MDR (Memory Data Register) temporarily holds data being transferred between the CPU and main memory.
MDR CPU और main memory के बीच transfer होने वाले data को temporarily hold करता है।
कुछ textbooks में इसे Memory Buffer Register (MBR) भी कहा जाता है।
Example
यदि CPU memory से कोई value पढ़ता है, तो transfer के दौरान वह value MDR में रखी जा सकती है।
🧠 CPCT Trick
MDR = Memory Data
MAR → Address
MDR → Data
8. MAR vs MDR – Very Important
यह CPCT और अन्य competitive exams के लिए बहुत important difference है।
| MAR | MDR |
|---|---|
| Memory Address Register | Memory Data Register |
| Memory location का address रखता है | Data रखता है |
| Address | Data |
| Where? | What? |
🔥 Super Trick
MAR = WHERE
कहाँ से data लेना है या कहाँ data access करना है?
MDR = WHAT
क्या data transfer हो रहा है?
9. Stack Pointer – SP
Stack Pointer (SP) points to the current/top location of the stack in memory.
Stack Pointer stack की current/top position को identify करने में मदद करता है।
Stack का उपयोग कई situations में होता है, जैसे:
- Function calls
- Return addresses
- Local data
- Temporary information
🧠 CPCT Trick
SP = Stack Pointer → Stack
10. Status / Flag Register
The Status Register or Flag Register contains flags that indicate the status of results or CPU conditions.
Status/Flag Register में ऐसे flags होते हैं जो arithmetic/logical operations के परिणाम या CPU की कुछ स्थितियों की जानकारी देते हैं।
Common flags may include:
- Zero Flag (ZF)
- Carry Flag (CF)
- Sign/Negative Flag (SF/NF)
- Overflow Flag (OF)
Example
यदि किसी operation का result 0 है, तो Zero Flag set हो सकता है।
🧠 CPCT Trick
Flag Register = Result की स्थिति बताता है
11. General Purpose Registers – GPR
General Purpose Registers (GPRs) are registers that can be used for a variety of operations depending on the CPU architecture and instruction set.
General Purpose Registers का उपयोग architecture के अनुसार विभिन्न प्रकार के data और intermediate values को temporarily रखने के लिए किया जा सकता है।
इनका उपयोग:
- Data storage during calculations
- Intermediate results
- Address calculations
- Temporary values
के लिए किया जा सकता है।
12. Register vs Cache vs RAM
यह difference भी examination में पूछा जा सकता है।
| Feature | Register | Cache | RAM |
|---|---|---|---|
| Location | CPU core/processor | Inside/near CPU | Main Memory |
| Speed | Extremely fast | Very fast | Slower than cache/registers |
| Capacity | Very small | Small | Much larger |
| Purpose | Immediate CPU operations | Frequently needed data/instructions | Working memory |
| Example | PC, IR, MAR | L1/L2/L3 | DDR RAM |
🧠 Speed Trick
Register → Cache → RAM
Generally, CPU से दूरी बढ़ने पर access latency बढ़ती है और capacity बढ़ती जाती है।
13. Register vs RAM
Register
CPU processing के दौरान immediate data/instructions के लिए।
RAM
Currently running programs और data के लिए main working memory।
Easy Trick
Register = CPU का छोटा working area
RAM = Computer की बड़ी working memory
14. How Registers Work During Instruction Execution
एक simplified instruction cycle को समझते हैं।
Step 1 – PC
Program Counter अगले instruction का address रखता है।
↓
Step 2 – MAR
Instruction का memory address MAR में जा सकता है।
↓
Step 3 – Memory
Memory उस address से instruction/data उपलब्ध कराती है।
↓
Step 4 – MDR
Transferred information MDR में आ सकती है।
↓
Step 5 – IR
Fetched instruction को IR में रखा जा सकता है।
↓
Step 6 – Decode
Control Unit instruction को decode करती है।
↓
Step 7 – Execute
ALU या अन्य execution unit operation perform करती है।
Simplified Flow
PC → MAR → Memory → MDR → IR → Decode → Execute
यह एक simplified educational model है; वास्तविक CPU microarchitecture में data movement अधिक complex हो सकता है।
15. CPU Registers and Instruction Cycle
Fetch
Instruction को memory से fetch किया जाता है।
Decode
Instruction को समझा/decode किया जाता है।
Execute
Required operation perform किया जाता है।
Registers इन stages के दौरान addresses, instructions, operands और results को temporarily hold करने में महत्वपूर्ण भूमिका निभाते हैं।
16. Most Important Registers – Quick Table
| Register | Full Name | Main Function |
|---|---|---|
| ACC | Accumulator | Intermediate/results |
| PC | Program Counter | Next instruction address |
| IR | Instruction Register | Current instruction |
| MAR | Memory Address Register | Memory address |
| MDR | Memory Data Register | Memory data transfer |
| SP | Stack Pointer | Top/current stack position |
| Flag Register | Status/Flag Register | CPU/result status |
| GPR | General Purpose Register | General temporary data |
🧠 CPCT Memory Tricks
Trick 1 – Main Five Registers
A P I M M
A → Accumulator
P → Program Counter
I → Instruction Register
M → Memory Address Register
M → Memory Data Register
Trick 2 – Address vs Data
MAR = Address
MDR = Data
🔥 सबसे important:
MAR → Where
MDR → What
Trick 3 – PC & IR
PC → Next Instruction
IR → Current Instruction
यानी:
PC looks ahead
IR holds current instruction
Trick 4 – Stack
SP → Stack Pointer
SP = Stack की Position
⭐ Important CPCT Facts
- Registers are very fast storage locations associated with the CPU.
- Register capacity is generally very small.
- Registers are used during instruction execution.
- PC stores the address of the next instruction to be fetched.
- IR holds the current instruction being decoded/executed.
- MAR holds a memory address.
- MDR holds data being transferred to/from memory.
- Accumulator can hold intermediate and final results in architectures that use an accumulator.
- SP points to the relevant position of the stack.
- Flag Register stores status information/condition flags.
- Register organization varies between CPU architectures.
- Registers are generally faster and smaller than cache and RAM.
🎯 Important CPCT MCQs
Q1. Which register contains the address of the next instruction?
A) IR
B) PC
C) MDR
D) MAR
Answer: B) PC
Q2. Which register holds the current instruction?
A) IR
B) PC
C) SP
D) MDR
Answer: A) IR
Q3. Which register stores a memory address?
A) MDR
B) MAR
C) IR
D) ACC
Answer: B) MAR
Q4. Which register is associated with data transfer between CPU and memory?
A) MDR
B) PC
C) SP
D) IR
Answer: A) MDR
Q5. Which register is associated with the stack?
A) MAR
B) IR
C) SP
D) PC
Answer: C) SP
Q6. Which register may hold intermediate results of arithmetic operations?
A) Accumulator
B) Program Counter
C) MAR
D) IR
Answer: A) Accumulator
Q7. Which register contains status/condition flags?
A) Flag Register
B) MAR
C) MDR
D) PC
Answer: A) Flag Register
Q8. Which is generally the fastest storage location?
A) Hard Disk
B) RAM
C) Cache
D) CPU Register
Answer: D) CPU Register
Q9. MAR stands for:
A) Memory Access Register
B) Memory Address Register
C) Main Address Register
D) Memory Allocation Register
Answer: B) Memory Address Register
Q10. MDR stands for:
A) Memory Data Register
B) Main Data Register
C) Memory Device Register
D) Main Directory Register
Answer: A) Memory Data Register
Q11. What does PC stand for?
A) Processing Control
B) Program Counter
C) Program Control
D) Processor Counter
Answer: B) Program Counter
Q12. Which register is primarily related to the current instruction?
A) IR
B) PC
C) SP
D) MAR
Answer: A) IR
📌 One-Minute Revision
CPU REGISTERS
ACC → Result/Calculation
PC → Next Instruction Address
IR → Current Instruction
MAR → Memory Address
MDR → Memory Data
SP → Stack
Flag Register → Status
GPR → General Data
🔥 Ultimate CPCT Formula
“PC Finds, MAR Addresses, MDR Moves, IR Interprets, ALU Calculates.”
याद रखें:
PC → Next Instruction
↓
MAR → Address
↓
MDR → Data/Instruction Transfer
↓
IR → Current Instruction
↓
ALU → Calculation/Logic
Conclusion – निष्कर्ष
CPU Registers are an essential part of computer architecture. They provide extremely fast temporary storage for the CPU during instruction execution.
CPU Registers कंप्यूटर architecture का एक महत्वपूर्ण भाग हैं। ये CPU को processing के दौरान data, addresses, instructions और intermediate results को बहुत तेजी से access करने में सहायता करते हैं।
For CPCT and competitive examinations, the most important registers to remember are:
PC → Next Instruction
IR → Current Instruction
MAR → Address
MDR → Data
ACC → Calculation/Result
SP → Stack
Flag Register → Status
🎯 Final CPCT Memory Line
“PC–IR–MAR–MDR: Program, Instruction, Address, Data.”
PC = Next instruction address
IR = Current instruction
MAR = Memory address
MDR = Memory data
यही चार registers CPU Registers के questions में सबसे ज्यादा useful हैं।
Comments
Post a Comment