Homework 2 (doc) - ECE 3140/CS 3420 Spring 2010 Homework 2...

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

View Full Document Right Arrow Icon
ECE 3140/CS 3420 Spring 2010 Homework 2 Due Tuesday, Feb 23, 2009 before 10:00pm EST Homework Submission Policies 1. Show your work where appropriate. 2. Homework Assignments are done individually without calculators . 3. Homework must be typed and submitted in plain text or PDF format. No scanned PDF (or scanned ANYTHING) allowed. 4. All homework should be submitted through CMS. Under no circumstances should a submission be made by sending the completed assignments to a course staff by email, unless explicitly requested. (Make sure you are signed up for the class on CMS BEFORE the submission deadline.) 5. In general, late submissions will not be graded. However, if CMS is down prior to a deadline, please contact the course staff BEFORE the deadline and make a submission when the system is back up (it will not be penalized). 6. Questions may be directed to the ECE/CS 314 consultants and the newsgroup (as always). Problem 1. (20 points) The following assembly code sequence is executed on a MIPS machine of unknown endian-ness, (i.e., either big-endian or little-endian). The initial register values are as shown in Table 1 . a) If the result in $14 after executing this code is 0x01, is the machine big-endian or little-endian? b) If the endian-ness of the machine changes, what is the value in register $14 after executing this code sequence? sw $9, 0($8) sw $10, 8($8) sh $10, 4($8) sh $11, 6($8) sb $9, 9($8) sb $10, 10($8) sb $11, 11($8) lbu $12, 0($8) lbu $13, 4($8) xor $14, $13,$12 lbu $15,8($8) xor $14,$14,$15 Table 1: Register Values $8 0x4000C100 $9 0xABCDEF01 $10 0xBEEFF00D $11 0xF1FEDEAD 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
c) Show the contents of memory after executing the above code sequence on a big-
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/08/2010 for the course ECE 3140 taught by Professor Mckee/long during the Spring '07 term at Cornell University (Engineering School).

Page1 / 6

Homework 2 (doc) - ECE 3140/CS 3420 Spring 2010 Homework 2...

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

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