Practice Midterm

  1. Here is a binary number: 01000011
  2. Convert to signed decimal the number 0xFFFFFFE3
  3. X, Y, and Z are numbers. Write an assembly language program to print the result of (X + Y) / Z , and then a string labeled finish:
  4. Write a function whose argument (in $a0) is the address of a string. It should return (in $v0) the number of 'e's in the string.
  5. Write a function whose arguments are the address of an array of words, and the length of that array (in $a1). Return the maximum value in the array.
  6. for this instruction, using the information on pp. 60-61, show how it is encoded in binary, and hexadecimal.
    	sub $t3, $t1, $t2

Try it yourself first, then see possible answers