Description
Purpose: Become familiar with the MIPS Instruction Language and Design principles
Points: 110
Reading/References: Chapter 3
Answer the below questions. Responses must be submitted in hand writing/word document via the class web site. You can also submit your work in “.pdf” format.
- Convert (125.125)10to hexadecimal number using IEEE 754 floating-point conversion. Write the design steps and solve it accordingly. [10 pts]
- Convert Hex: 0x C1950000 to decimal number using IEEE 754 floating-point conversion. Write the design steps and solve it accordingly. [10 pts]
- Use 4-bit version (result 8-bit), multiply 8ten (multiplicand: 10002) and 5ten (multiplier: 01012) [20 pts, 10 pts each]
- Show all the steps for multiplication with algorithm 1(Hint: ALU is 64-bit)
- Show all the steps for multiplication with algorithm 2 (Hint: ALU is 32-bit)
- Use 4-bit version (result 8-bit), do the division with the given data 610 (dividend: 01102) and 310 (divisor: 00112). Use Algorithm 2 only that has 32-bit ALU. (refer PPT and Textbook: 189-192) [10 pts]
- Compute floating-point addition (binary) and multiplication (binary) for the following inputs (Textbook Page 204, 206) [40 points, 10 pts each]
- 001 x 2-4 and 1.010 x 2-5
- ii) 100 x 24 and 0.011 x 25
- If we assume we place the loop starting at location 0x00400024 in memory, what is the MIPS machine code for this loop? Explain your answer with comments. (Note: You can edit this table as needed like merge or add more rows/columns; from Textbook -reference page: 115) [20 pts]
Loop: sll $t1, $s3,2 # Temp reg $t1 = 4 * i
add $t1, $t1, $s6 # $t1 = address of save[i]
lw $t0,0($t1) # Temp reg $t0 = save[i]
bne $t0, $s5, Exit # go to Exit if save[i] ≠ k
addi $s3, $s3,1 # I = I + 1
j Loop # go to Loop
Exit:
| Memory Address | Opcode | Rs | Rt | Rd | Shamt | Function |
| 0x00400024 | ||||||

