Instruction Formats, Cycles & Micro-Operation Sequences
Comprehensive breakdown of instruction word formats, register transfer language (RTL), fetch-decode-execute phases, control signals, and complete machine instruction execution.
Learning Objectives
- •Formulate RTL micro-operation sequences for Fetch, Decode, and Execution of memory-reference instructions.
- •Compare 3-Address, 2-Address, 1-Address, and 0-Address machine code implementations of arithmetic expressions.
- •Construct timing state diagrams showing how sequence counters synchronize register transfers.
Essential Prerequisites
- •Processor registers (PC, IR, MAR, MDR, AC)
- •Memory bus timing concepts
Instruction Cycle - Fetch, Decode, Execute ka Complete Lifecyle
CPU ki poori zindagi bas ek loop mein chalti hai: Instruction lao (Fetch), samjho kya karna hai (Decode), aur task perform karo (Execute). Har ek badi instruction chhote-chhote nano-seconds ke register transfers mein toot-ti hai jinko hum 'Micro-operations' kehte hain. Control unit ek orchestra conductor ki tarah timing signals (T0, T1, T2...) bhejta hai jo circuits ko enable karte hain.
Chef ki kitchen: Fetch = Recipe book se order padhna. Decode = Ingredients identify karna ki katori mein kya chahiye. Execute = Gas on karke frying pan mein cook karna. Store = Dish plate mein serve karna.
Register Transfer Language (RTL) mein Fetch cycle pakka likhne ko aata hai: T0: AR <- PC, T1: IR <- M[AR], PC <- PC + 1, T2: Decode opcode in IR, AR <- IR(0-11). Ye 3 lines likhte hi professor impress ho jaayenge!
Hardwired Control Unit vs Microprogrammed Control Unit ka difference? Hardwired = Combinational logic gates se bana hota hai, superfast hota hai lekin RISC instructions badalna impossible hai. Microprogrammed = Control memory (ROM) mein micro-instructions store hoti hain, flexible hota hai lekin thoda slow hota hai.
The Core Mental Model
Why This Exists
At the silicon level, the CPU is an orchestrated state machine. If micro-operations are out of order by even one nanosecond, register values become corrupted. Understanding RTL micro-operations reveals exactly how software instructions turn into electrical hardware signals.
Beginner Foundation
When your code says `x = a + b`, the CPU cannot do that in one flash. It must: 1) go fetch the command from RAM, 2) read what it means, 3) bring `a` from RAM, 4) bring `b` from RAM, 5) tell the adder to add them, and 6) store the answer. These tiny steps are micro-operations.
Micro Concepts Decomposition
Instruction Fields and Word Formats
An instruction is divided into fields: Opcode (operation to perform, e.g. ADD), Addressing Mode specifier, and Operand Address fields. Based on address fields, machines are classified as 3-Address, 2-Address, 1-Address (Accumulator), or 0-Address (Stack).
The Master Instruction Cycle: Fetch, Decode, Execute
Every machine instruction progresses through discrete sub-cycles: 1) Fetch: transfer instruction from memory to IR, increment PC. 2) Decode: determine opcode and operand locations. 3) Execute: manipulate ALU and registers. 4) Interrupt Check: verify external service requests.
Register Transfer Language (RTL) Micro-Operations
Micro-operations are primitive atomic operations executed during one clock period. Fetch phase in RTL: T0: MAR <- PC; T1: MDR <- M[MAR], PC <- PC + 1; T2: IR <- MDR. Timing signals T0, T1, T2 ensure non-conflicting bus transfers.
Hardware State Machine Architecture
Interactive Simulator
Addressing Modes & Effective Address (EA) Visualizer
| R1 | 0x0000 | General Purpose |
| R2 | 0x1004 | General Purpose |
| PC | 0x0200 | Program Counter |
| XR | 0x0008 | Index Register |
| 520 | 0x9999 | Memory Word |
| 4096 | 0x0042 | Memory Word |
| 4100 | 0x2000 | Memory Word |
| 4108 | 0x7777 | Memory Word |
| 8192 | 0x5555 | Memory Word |
End-to-End Execution Trace
Step-by-Step Code Execution (C)
Sandbox Terminal Ready
Click Run Code or press Ctrl+Enter to compile and execute.
Where Students Lose Marks
Active Assessment Quiz
No Practice Questions Configured
Questions for this topic are currently undergoing faculty review.