EE380 Assignment 4 Solution

  1. 50% 50% A single-precsion floating-point value for the MIPS processor is encoded in the IEEE-compliant format illustrated below (the LSB is on the right). Given this encoding, using only MIPS integer instructions, write a function that will compute the absolute value of a floating-point number, i.e., x=abs(y);. Hints: use the fact that negative and positive float values differ only in the Sign bit, and test your routine using SPIM before you submit it.


  2. 100% We all know that floating point arithmetic is subject to roundoff errors. What about how floating point addition is implemented makes it inherently more subject to loss of accuracy than floating-point multiplication?



  3. 100% In the single-cycle design shown in the above (rather large and very familiar) figure, which of the following signals is a "don't care" when executing a MIPS beq instruction?
    Branch
    RegDst
    ALUSrc
    MemRead
    RegWrite
  4. 100% How would you build the "Shift left 2" function unit shown in the single-cycle design in the figure above? Answer in terms of the logic functions relating input bits I0-I31 to output bits O0-O31.
  5. 100% Which of the following techniques for implementing control logic for a single-cycle design (like that given in Chapter 5) is most likely to yield the circuit that operates with the smallest delay?
    Lookup Table (ROM)
    Random Logic
    Gate Array
  6. 100% In multiplying an integer, X, by 17 using the basic shift-and-add algorithms discussed in class and in the book, what is the minimum number of additions that must be performed? Show the values that are added (hint: use (X<<Y) to represent the value of X shifted by Y bit positions).


  7. 100% In the single-cycle design shown in the above (rather large and very familiar) figure, suppose that ALUSrc=0 and MemRead=1. Which of the following MIPS instructions might be executing?
    Sw $t0,4($t1)
    Lw $t0,4($t1)
    Ori $t0,$t1,2
    Add $t0,$t1,$t2
    None of the above instructions is consistent with the stated signal values


Although this is not a secure server, users are bound by the UK code of conduct not to abuse the system. Any abuses will be dealt with as serious offenses.


EE380 Computer Organization and Design.