questiona using an appropriate diagram


Question:

(a) Using an appropriate diagram, illustrate the structure of an instruction used for branching purposes and state the purpose of each part.

(b) Given the number 104345 needs to be loaded in the memory address pointed by the Base Address of $s2 by an offset of 8 bytes. Provide the instructions to perform this operation.

(c) Translate the following Assembly instructions in machine language instructions. Describe every step involved in the conversion process.

i. sw $t5, 32($s1)
ii. bne $t3,$s3,L4 (given that L4 is at line 253)

Consult appendix at the end of this question paper for R, I, J types (formats) and table of registers.

(d) The following machine language instructions have been inspected by a hacker during its transmission on an insecure network. Given that it may involve sensible data, you have been assigned the task to write its equivalent Assembly instruction.

00100010111010110000000010011110

(e) Consider the following C segment:

loop: g = 12 + B[8] - A[i];
i = i +j;
if (i!=h) goto loop;

A is an array of 80 elements. Variables g, h, i and j are associated with registers $S1, $S2, $S3 and $S4 respectively. Base of array A is $S5 and that of B is $S6. What is the MIPS assembly code for this C loop?

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: questiona using an appropriate diagram
Reference No:- TGS0362102

Expected delivery within 24 Hours