Question

8. a) (3) Assume that initially registers $8 and $10 contain 4 and 8 respectively. If...

8. a) (3) Assume that initially registers $8 and $10 contain 4 and 8 respectively. If every byte in the data memory initially contains the value 6, show the contents (in decimal) of all registers and/or data memory locations modified by following pair of instructions:

            lui        $10,0x1004

            sw        $8,-256($10)

b) (3) Assume that initially registers $8 and $10 contain 4 and 8 respectively. If every byte in the data memory initially contains the value 6, show the contents (in decimal) of all registers and/or data memory locations modified by following pair of instructions:

            lui        $10,0x1004

            lw        $8,-256($10)

d) (3) Assume that initially registers $8 and $10 contain 4 and 8 respectively. If every byte in the data memory initially contains the value 6, show the contents (in decimal) of all registers and/or data memory locations modified by following pair of instructions:

lui        $10,0x1004

            ori       $10,$8,0x8000

0 0
Add a comment Improve this question Transcribed image text
Answer #1

8)

a)

Assumed :-

$8 = 4

$10 = 8

every memory byte is 6

lui $10 , 0x1004 => $10 = 0x1004

sw $8,-256($10) => memWrite32[(0x1004) - 0x100] = memWrite[0xF04] = 4

So,

$10 = 0x1004 = 4100

memory [0xF04] = 4

b)

Assumed :-

$8 = 4

$10 = 8

every memory byte is 6

lui $10 , 0x1004 => $10 = 0x1004

lw $8,-256($10) => memRead32[(0x1004) - 0x100] = memRead32[0xF04] = 0x6060606

So,

$10 = 0x1004 = 4100

$8 = 0x6060606 = 101058054

d)

Assumed :-

$8 = 4

$10 = 8

every memory byte is 6

lui $10 , 0x1004 => $10 = 0x1004

ori $10,$8,0x8000 => $10 = $8 | 0x8000 = 0x4 | 0x8000 = 0x8004

So,

$10 = 0x1004 = 4100 (first instruction)

$10 = 0x8004 = 32772(finally)

Add a comment
Know the answer?
Add Answer to:
8. a) (3) Assume that initially registers $8 and $10 contain 4 and 8 respectively. If...
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
  • Assume the MIPS instruction subset is redefinied to contain only the following instructions: 1. Assume that...

    Assume the MIPS instruction subset is redefinied to contain only the following instructions: 1. Assume that our MIPS instruction subset is redefined to contain only the following instructions: Instruction Instruction fetch Register read & ALU operation Data Memory Register write decode 0 ns R-format 2ns 1 ns lw ns l ns 2 ns 5 ns 1 ns ns 1 ns ns 0 0 bne The table lists the times required for each step within each instruction. Recall that with the...

  • annotare Quad BULUM ASSEMBLY/MICOCONTROLLER MID-TERM EXAM 03/04/2020 1. Assume that registers and memory locations contain the...

    annotare Quad BULUM ASSEMBLY/MICOCONTROLLER MID-TERM EXAM 03/04/2020 1. Assume that registers and memory locations contain the following values at the start of the instruction. Give each register or memory location that is modified by the following instructions and its new value. Which statements are not validinstructions WO (location) 0x1000 (value),0x1000 (location) 0x382A (value) W2 (location) 0x8345 (value), W1(location) 0x1003 (value) e valid a.mov W2, [Wo] b. mov #0x1000, WO C. mov Ox1000 d. mov.b W2, [W1] e. mov.b W2, WO...

  • 3. Virtual Memory (20 points) An ISA supports an 8 bit, byte-addressable virtual address space. The...

    3. Virtual Memory (20 points) An ISA supports an 8 bit, byte-addressable virtual address space. The corresponding physical memory has only 256 bytes. Each page contains 32 bytes. A simple, one-level translation scheme is used and the page table resides in physical memory. The initial contents of the frames of physical memory are shown below. VALUE address size 8 bit byte addressable each byte of addressing type memory has its own address 32 B page size physical memory size 256...

  • 6. In each of the instructions shown below, assume that the label LOOP corresponds to memory...

    6. In each of the instructions shown below, assume that the label LOOP corresponds to memory address   0x40CE0078. a) (5) Show in hex the 32-bit machine code for the instruction    bltzal $14,LOOP Assume that the machine code will be located at address 0x40CE8880. b) (5) Register $14 contains negative 2 in two’s complement form. Show, in hex (0xdddddddd), the 32-bit contents of all registers within the CPU that are modified when the instruction bltzal $14,LOOP is executed.. c) 5) Show...

  • Stack Operation 10. (10 pts.) Show the contents of the stack and affected registers at the two marked points in the exe...

    Stack Operation 10. (10 pts.) Show the contents of the stack and affected registers at the two marked points in the execution of the followin code. Assume RO-0, R1-1, R2-2, R3-3, R4-4, R5-5, and R6-6. The initial value for stack pointer (prior to executing this code block) is given as SP-0x20001000 PUSH R2,R3) ADD R4, R1, Re ;<---A POP R5, R6) ADD R5, R5, R4 ADD R6, R6, R5 PUSH (R4-R6); SUBS Re, RO,R1-B a) Show the contents of Stack,...

  • I want to calculate Y[2]=X[3]+X[4] I'm not sure that I wrote right codes. .text main ....

    I want to calculate Y[2]=X[3]+X[4] I'm not sure that I wrote right codes. .text main . la $50, x #get base address of x la $s1, y #get base address of y lw $to, 12 ($50)#get data from memory of x[3] lw $t1 , 1 6($50) #get data from memory of x[4] add $t2, $t0, $t1 sw $t2, 8($51 ) #store result to y[2] li $v0, 10 #exit program syscall data x: word 5, 1, 17,-4, 6, 3 y: .word...

  • The AVR provides a rich instruction set to support high-level languages. The AVR address- ing modes...

    The AVR provides a rich instruction set to support high-level languages. The AVR address- ing modes also simplify the access of complex data structures. The AVR has a version of the ADD instruction that includes the C flag as one of the source operands, which enables multiple- precision addition operation. The AVR also has a version of the SUB instruction that includes the C flag as one of source operands and hence is used to perform multiprecision subtraction operation. The...

  • You are given a homework processor (HPro) capable of addressing 32 8-bit (1 byte) wide registers....

    You are given a homework processor (HPro) capable of addressing 32 8-bit (1 byte) wide registers. However, it has only 29 physical registers. Register RO, R1 and R31 are not physically implemented. Instead, every read from RO, R1 and R31 will return a constant zero (00000000), constant one (00000001) and all ones (11111111), respectively. Every write to RO, R1 and R31 will go to null (dummy write). Assume that all other registers have initially unknown (X) state (This in fact...

  • Problems 1-10: State Answers should be in the form of: id/value. For example to sho00, 0x301,...

    Problems 1-10: State Answers should be in the form of: id/value. For example to sho00, 0x301, changed to 0x76, specify as R15/0x76. and 0X302 have been changed to Ox60, 0x70, and OxBo, respecve any registers, memory locations, or 10 ports which are changed. example to show that register 15 has To show that memory locations 0x301, 0x300/0x60 0x3010x70 0x302/0x80. change. You may specify values as binary by using the by using the 0x prefix (0x3A) or decimal (123). If an...

  • Problem 4 (15pts): (a) (5pts) Consider the following MIPS memory with data shown in hex, which ar...

    Problem 4 (15pts): (a) (5pts) Consider the following MIPS memory with data shown in hex, which are located in memory from address 0 through 15. Show the result of the MIPS instruction "lw Ss0,4(Sa0)" for machines in little-endian byte orders, where Sa0 4. Address Contents Address Contents 9b lb 2 4 6 10 b4 c5 12 13 14 15 3d 5f 70 7 8f (b) (10pts)Assume we have the following time, performance and architecture parameters in the specified units Ec-...

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