Practice Midterm
- Here is a binary number: 01000011
- Is it odd or even?
- You can't write it that way in a computer language. Write it as
a character, base-16 number, and decimal number.
- Convert to signed decimal the number 0xFFFFFFE3
- 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:
- 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.
- 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.
- 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