Question: pls do it in python Part III: Decode a Machine Instruction (20 points) The Fictional KIPS Computer For this part you will implement a function
pls do it in python





Part III: Decode a Machine Instruction (20 points) The Fictional KIPS Computer For this part you will implement a function that decodes machine language instructions of a fictional computer we will call the KIPS. You should read through the Unit 9 lecture notes before starting this part. KIPS supports the following instructions that the CPU can execute: add dest, opl, op2: Performs an addition. dest is the desination register where the sum of regis- ters op1 and op2 will be saved. (dest-op1 op2) . sub dest, opl, op2: Performs a subtraction. dest is the desination register where the difference of registers op1 and op2 will be saved. (dest-op1-op2) mul dest, opl, op2: Performs a multiplication. dest is the desination register where the product of registers opl and op2 will be saved. (dest-opl op2) div dest, opl, op2: Performs an integer division. dest is the desination register where the quotient of registers opl and op2 will be saved. (dest-opl 17 op2) 11 dest, immediate. Stores the value immediate in register dest. (i.e.,dest = immediate) Recall from lecture that an immediate value is simply a constant. As with the real MIPS computer, the KIPS computer has 10 registers numbered $to, $t1, $t 9. In the above list of instructions, dest, op1 and op2 are registers. immediate is a positive integer (or zero). Instruction Formats Every KIPS instruction is exactly 32 bits in length. An arithmetical instruction's bits are divided up as follows
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
