Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

b. Answer the following questions based on the given MIPS code snippet. b. Jawab soalan berikut berdasarkan keratan kod MIPS yang diberikan. NEXT: beq $11,

image text in transcribed

image text in transcribed

b. Answer the following questions based on the given MIPS code snippet. b. Jawab soalan berikut berdasarkan keratan kod MIPS yang diberikan. NEXT: beq $11, SO, EXIT addi $t1,$t1,-1 addi $12, $12,1 addi $13, $13, -2 NEXT EXIT: li $v0, 10 syscall iii. For code snippet above, write the equivalent C/C++ code. Assume that the register $t1, $t2 and $13 are integer 11, 12 and 13 respectively. iii . Untuk keratan kod di atas, tulis kod C/C++ yang setara. Andaikan bahawa daftar $t1, $t2 dan $13 masing-masing ialah integer 11, 12 dan 13. (7 marks) c. The following snippet program is a MIPS instruction with its memory address (in hexadecimal). By referring to MIPS Reference Data, convert the underlined assembly instructions to machine code. Explain how you get the answer. c. Keratan aturcara berikut ialah arahan MIPS dan alamat ingatan (dalam heksadesimal). Dengan merujuk kepada Data Rujukan MIPS, tukar arahan perhimpunan yang bergaris bawah kepada kod mesin. Terangkan bagaimana anda mendapat jawapan. [00400024) NEXT: beg $t5,$t0,EXIT [00400028] addi $14, $t5, -1 [0040002c] sub $81, $s2, $s3 [00400030] andi $t5, $s2,1 [00400034] andi $55, $s2, 1 [00400038) j.NEXT [0040003c] add $17, $t3, $10 [00400040] EXIT: ori $54, $s5, 10 [00400044) li $v0, 10 [00400048] syscall (6 marks)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

10-3. How does a conclusion differ from a recommendation? [LO-2]

Answered: 1 week ago