Question
2). Write MIPS assembly code for the C instruction f=(g+h)+5 using the minimum number of instructions.
Solution Preview
These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.
a. We need to transform into binary representation for 64.2Separately for the left and right parts of the decimal point.
This way, 64 is 1000000 in binary.
For .2 we can use the following procedure:
.2 x 2 = 0.4 0 (msb)
.4 x 2 = 0.8 0
.8 x 2 = 1.6 1
.6 x 2 = 1.2 1
.2 x 2 = 0.4 0
.4 x 2 = 0.8 0
.8 x 2 = 1.6 1
.6 x 2 = 1.2 1...
By purchasing this solution you'll be able to access the following files:
Solution.docx.