Question
Computer Architecture problem

Consider the following number 5 Digits Depending on the given number, convert the assembly instruction into machine code in hexadecimal. Register (F)fopl opcode funct(C)Irs! Number Even and 0x0 0x24 Even $a0 Odd or Ox0 0x25 Odd $al Number Even $s6 22 5 Odd $s7 23 Write out your assembly instruction f irst. Convert it into machine code in hexadecimal. If the content of the registers are as follows, determine the value of $vO after your instruction has been executed. (You can use the right table for your calculation, but not required.) Binary $a0 0x12345678 $al 0xFEDCAB98 $s6 0x 30502060 $7 0xF3F5F2F6 (rs) (rt) and/or $v0
0 0
Add a comment Improve this question Transcribed image text
Answer #1

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....

Add a comment
Know the answer?
Add Answer to:
Computer Architecture problem Consider the following number 5 Digits Depending on the given number, convert the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Group Project 1 The Micro-1 Processor Simulation <Micro-1 Computer> Here's the organization of a computer equipped...

    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...

    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,...

    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 wi...

    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...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT