Quiz1 - f=(g+h)-(i+j); g=h+A[8]; if (f==h) A[12] = h +...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1048 Computer Organization Quiz 1 1. Let’s assume that A is an array of 100 words and that the compiler has associated the variables f , g , h , i , and j with the registers $s1, $s2 , $s3 , $s4 , and $s5 respectively. Let’s also assume that the starting address, or base address, of the array is in $s6 . Please compile the following C code into MIPS assembly code:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: f=(g+h)-(i+j); g=h+A[8]; if (f==h) A[12] = h + A[8]; else A[12] = h - A[8]; 2. Please translate the above MIPS assembly instructions into machine instructions (a). First interpret the machine instruction as a combination of decimal numbers (b). Then translate the first two instructions as combinations of binary numbers : :...
View Full Document

Page1 / 2

Quiz1 - f=(g+h)-(i+j); g=h+A[8]; if (f==h) A[12] = h +...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online