Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CIS 314 Homework Assignment 2 - Computer Organization, University of Oregon, Fall 2008, Assignments of Computer Architecture and Organization

A computer science homework assignment from the university of oregon's computer and information science department for the course cis 314 computer organization, fall 2008. The assignment includes various programming and assembly language questions related to computer organization concepts such as logical operators, mips instructions, and stack management.

Typology: Assignments

Pre 2010

Uploaded on 07/22/2009

koofers-user-pfl
koofers-user-pfl 🇺🇸

4

(1)

10 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download CIS 314 Homework Assignment 2 - Computer Organization, University of Oregon, Fall 2008 and more Assignments Computer Architecture and Organization in PDF only on Docsity! CIS 314 Homework Assignment 2 Fall 2008 Page 1/1 University of Oregon Computer and Information Science Department CIS 314 Computer Organization Fall 2008 Posted: ~pm, Friday, October 17th, 2008 Due: 10am, Friday, October 24th, 2008 Assignment 2 – 100 points [10] 1. From the textbook: 2.30 (p. 150) [10] 2. From the textbook: 2.31 (p. 151) [20] 3. From the textbook: 2.37 (p. 152) [10] 4. Logical Operators. This MIPS code swaps the values of registers $t0 and $t1. add $t2, $t0, $zero # t2 = t0 add $t0, $t1, $zero # t0 = t1 add $t1, $t2, $zero # t1 = t2 The same thing can be implemented without using any registers except $t0 and $t1, using logical operators only, AND, OR, XOR. a. Rewrite the code as described. b. Is there any advantage to doing it this way? [10] 5. The MIPS translation of the C segment while (save[i] == k) i += 1; on page 74 in P&H is code that might be produced by a very simple or naive compiler. The assembly code uses both a conditional branch and an unconditional jump each time through the loop. This would probably be improved by a more intelligent compiler.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved