












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!













Assume we have a processor whose Instruction Set consists of four machine language instructions
Reduced Instruction Set Computers (RISC)
Its functional units are: Data Registers : D0, D1, D2,..., D7 for arithmetic operations – holds any kind of data Address Registers : A0, A1, A 2 ,..., A7 serve as pointers to memory addresses Working Registers : several such registers – serve as scratch pads for CPU Program Counter (PC) holding the address in memory of the next instruction to be executed. After an instruction is fetched from memory, the PC is automatically incremented to hold the address of, or point to, the next instruction to be executed. Instruction Register (IR) holds the most recently read instruction from memory while it is being decoded by the Instruction Interpreter. Memory Address Register (MAR) holds the address of the next location to be accessed in memory. Memory Buffer Register (MBR or MDR) holds the data just read from memory, or the data which is about to be written to memory. Buffer is referring to temporarily holding data. Status Register (SR) to record status information
Fetch Cycle:
MAR PC MDR M[MAR] IR MDR D2 D1 + D PC PC + 2 Fetch Decode Execute
MAR PC MDR M[MAR] IR MDR MAR IR (X) PC PC + 2 Fetch Decode MDR M[MAR]^ Execute D0 MDR + D Address X extracted from IR Contents of Address X transferred to MDR Contents of Address X added to D
GPR CPU Type equation here. MBR MAR PC Increment Interpreter IR Register File 0 1 2 3 ALU CPU (^) Memory Data bus Address bus Memory Control 16 bit 8 bit
Accumulator Architecture CPU MBR MAR PC Increment Interpreter IR Acc ALU CPU (^) Memory Data bus Address bus Memory Control 16 bit 10 bit
GPR vs Acc Let the following instructions be allowed: For GPR machine (with 4 data reg)
𝑖
Move M[X] , 𝑅 𝑖
𝑖
𝑖
𝑖
Add 𝑅 𝑖
𝑗
𝑖
𝑖
𝑗
𝑗
𝑖
𝑖
𝑗
GPR vs Acc Assembly Program for a <- (x + y) * (x – y) For GPR machine (with 4 data reg) Move 𝐷0, 𝑋 Add 𝐷0, 𝑌 Move 𝐷1, 𝑋 Sub 𝐷1, 𝑌 Mult 𝐷0, 𝐷 Move 𝐴, 𝐷 Stop For Accumulator machine LD X ADD Y ST C LD X SUB Y MULT C ST A STOP