Answe is as follows :
As we see that we have to identify the instruction first i.e. according to {op} , v0 {rs} {rt}
where op s opcode, v0 is destination register , rs and rt are source registers.
so as per given scenario
we have F = 1 i.e. odd so instruction is OR with opcode 0x0 and funct is 0x25
we have G = 5 i.e. odd so rs is $a1 i.e. register number 5
we have H = 8 i.e. even so rt is $s6 i.e. register number 22
here $v0 is register number 2
So our final instruction is
OR $v0 , $a1 , $s6
So equivalent instruction is OR $2 , $5 , $22
so the machine instruction is :
opcode = 6 bits = 000000
rs = 5 bits = $5 = 00101
rt = 5 bits = $22 = 10110
rd = 5 bits = $2 = 00010
funct = 11 bits = 00000011001
So complete binary instruction is :
000000 00101 10110 00010 00000011001
= 0000 0000 101 0110 0001 0000 0001 1001
So we have
OR $v0 , $a1 , $s6
where $a1 = 0xFEDCAB98 = 1111 1110 1101 1100 1010 1011 1001 1000
and $s6 = 0x30502060 = 0011 0000 0101 0000 0010 0000 0110 0000
So after ORing both we get = 1111 1110 1101 1100 1010 1011 1111 1000 = FEDCABF8
So $v0 contains 0xFEDCABF8
if there is any query please ask in comments....
Computer Architecture problem Consider the following number 5 Digits Depending on the given number, convert the...
Group Project 1 The Micro-1 Processor Simulation <Micro-1 Computer> Here's the organization of a computer equipped with a Micro-1 processor Memory contains an array of integer cells: int cell[] = new int[CAP]; where CAP is the capacity of memory. Initially this is set to 256. Internally, the Micro-1 processor is equipped with eight 32-bit data/address registers and two 32 bit control registers: PC, the program counter, contains the address of the next instruction to execute. IR, the instruction register, contains...
5 Exercises Now that everything is working you can try the following exercises. To complete them you will need to refer to the documentation in Appendix A- The MiteASM Assembler and Appendix B - The MiteFPGA Processor. Write an assembly language program for an over counter for a cricket umpire. This should display a count on the 7-segment display. The count should increase by 1 when button 0 is 1. pressed. It should reset to 0 when button 1 is...
5. Consider the SPIM code below. globl main .text main: ori $t1, $0, 10 ori $t2, $0, 11 add $t3, $t1,$t2 move $t4, $t3 The following image shows a screen shot of QtSPIM page when this program is loaded, and executed in step-by step fashion. Current instruction is highlighted. Data Text x Text Regs Int Regs [16] Int Regs [16] PC = 400028 EPC 0 Cause = 0 BadAddr = 0 Status = 3000ff10 HI LO = 0 = 0...
There is an example below Now that everything is working you can try the following exercises. To complete them you will need to refer to the documentation in Appendix A The MiteASM Assembler and Appendix B The MiteFPGA Processor. Write an assembly language program for an over counter for a cricket umpire. This should 1. display a count on the 7-segment display. The count should increase by 1 when button 0 is pressed. It should reset to 0 when button...