Question: Please answer the question no 2 as fast as you can. Thanks. ECE 412 Homework 4, page 1 of 2 pages Student Name: Out: 6

Please answer the question no 2 as fast as you can. Thanks.

Please answer the question no 2 as fast as you can. Thanks.ECE 412 Homework 4, page 1 of 2 pages Student Name: Out:

ECE 412 Homework 4, page 1 of 2 pages Student Name: Out: 6 Feb 23. Due: 13 Feb 23 Instructions: You will need ndditional sheets of paper. Put your name on each sheet and identify the question. Use the quick reference card to find the opcode, funct, and register number as suggested below. -Dr. Morris 1. Derive the hex machine code for the following assembly language instructions. You must show your work, i.e., the field names, followed by a mapping of the assembly language statement into those fields (in binary), followed by hexifying the result. Here is an example for the assembly language statement add $t0,$t1, $s2. (a) the 1w statement on textbook page 71 (b) the 1b statement on page 64 of the textbook (c) the s11 statement on textbook page 92 (d) the nor statement on textbook page 182 (e) the addi statement an page 195 of the textbook (f) the slt statement on page 94 of the textbook (g) the slti statement on page 136 of the textbook (h) the first sw statement on page 134 of the textbook (i) the sb statement on page 195 of the textbook (j) the second Lui statement on page 112 of the textbook (k) the bne statement on page 106 of the textbook; the target is four words past the bne statement, i.e., whatever statement is at the sum exit label. Note: per textbook page 115, the oflset is "relative to the following instruction," i.e., number of words from incremented PC value to target. (1) the j statement on page 195 of the textbook; note that the target is at word address 2500=0000009C4. Per textbook page 114, "...the 26-bit field in jump instruction is also a word address... " In this case. the value in the address field (2500) would correspond to the byte address 42500=10000. (im) the jr statement on page 64 of the textbook; note that we only need a single source register, therefore the It and rd fields are both set to $zero. (n) the jal statement on page 64 of the textbouk; Again, per textbook page 114. "..the 26-tit field in jump instructions is also a word address..." In this case, the value in the address field would correspond io a byte address 42500=10000. 2. Take the 14 hex machine code values from question 1 and disassemble them into assembly language statements. Again. I want to see your work. Here is an example for the hex machine code value 0x8FA3001C. Expanding the leftmost 6 bits yields 100011 . This is non-zero and does not have the values 000010 or 000011(j or jal), so it must be an I-type instruction. 'Therefore, we can dehexify into the I-type field format. Specifically, Ox8FA3001C. Left 6=100011: I-type You can verify your answers by comparing them to the answers in question 1. If they are different, then the solution to item in question 1 is wrong or the solution to item in question 2 is wrong

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!