# Quiz1 - f=(g h(i j g=h A[8 if(f==h A[12 = h A[8 else A[12 =...

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

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:

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

View Full Document
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

{[ snackBarMessage ]}

### Page1 / 2

Quiz1 - f=(g h(i j g=h A[8 if(f==h A[12 = h A[8 else A[12 =...

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

View Full Document
Ask a homework question - tutors are online