EEC70: Computer Structures and Assembly Language ProgrammingFall 2012 Example Final SolutionProblem 1 Short Answer Questions (12 points) Here are two bit strings in hexadecimal: 0x6f6cb000and0x6f70e000 Will overflow occur when you add them up if they are: (a)unsigned integers?(b)signed integers in two’s complement? (c)single-precision IEEE floating point? For each case, give reasons why or why not. Hint: You do *NOT* have to convert the hexadecimal strings to the value of the integer or floating point numbers in base 10 to answer these questions. (1.) 0x6F6CB0000 110 1111 0110 1100 1011 0000 0000 0000 +0x6F70E0000 110 1111 0111 0000 1110 0000 0000 0000 _0xDEDD9000(1.) 0 110 1111 0 11.101 1101 1001 0000 0000 0000 => 0 110 1111 11101 1101 1001 0000 0000 0000
View full document
1 Problem 2. MIPS Here is a loop written in MIPS. You may assume that any registers that seem to require initialization (such as being set to 0) have been properly initialized prior to entry into the loop. You may also assume that the loop is executed at least 5 times, so that registers need to be carefully maintained each time through the loop. There is a “jal” instruction in the middle of this code. Since certain registers may be overwritten as a result of a “jal”, they will need to be saved onto the stack priori to the “jal” and retrieved afterwards. Using only the code below, determine the minimum set of registers that must be saved on to the stack prior to each “jal” call in order for this code to execute correctly. Hint: Remember that, since the loop will execute multiple times, you need to look at the code following the “jal” as well as the code preceding it.
Want to read all 7 pages?
Previewing 2 of 7 pages Upload your study docs or become a member.
Want to read all 7 pages?
Previewing 2 of 7 pages Upload your study docs or become a member.
End of preview
Want to read all 7 pages? Upload your study docs or become a member.