Name:
CSc 656 Sample Final
(based on Spring 2007)
Problem 1 (25 points):
Consider the following C/C+ loop, executing on a system with a cache.
int i,x[100], y[100];
for (i=0;i<15;i+)
cfw_
sum = sum +
CSC 256 - Machine Structures
Project 5
Assigned : March 27th, 2017
Due : April 3rd, 2017 @ midnight
Total Points: 90 Points
Description For project five, your objective is to convert the given C+ code
CSc 256 Chapter 9 Assignment
Printouts due in class Thursday 5/3/2012, 3:45pm
(no late submissions; 3% of your grade)
This is an individual project. Work on your own. All submissions must be typed; su
CSC 256 - Machine Structures
EC WS
Name:
Date:
Assume PCSrc and branch are the same control signal
Q1 Fill in the control signals for the following instruction :
add $16, $16, $19
Reg Dst
ALU
Src
Mem
CSC 256 - Machine Structures
EC WS
Name:
Date:
Q1 Translate the following if-statement from C+ to MIPS.
/ x ->
if( x <
x =
elsecfw_
x =
$s1 , assume $s1 is already initialized
0 | x > 10)cfw_
x + 1;
k-way Set Associative Caches
In a k-way set-associative cache with N blocks, the N blocks are divided into
N/k sets, each with k blocks.
After computing index, block X from memory can be
placed in a
Name:_
Section (circle one): 1 2
CSC 256 Spring 2016
Quiz 2 5 points
1. Translate the following program into MIPS assembly language using the procedures
demonstrated in class. Remember, to pr
Chapter 2:
Basic Computer Operations and
Assembly Language Programming
Topics:
Components of a computer
Programmers view of computer system
Simple Program Translation with MIPS
Allocating variables to
Chapter 9 Memory systems
Topics:
Technology issues
Cache design
Virtual memory and operating system support
Reading:
P&H 5.1-5.5
8/2012
Chapter 9 Memory systems
1
CPU speed vs. memory speed
Main memor
Chapter 1:
Integer representations in computer systems
(Review)
Topics:
Unsigned representations
Signed representations
Signed binary and hexadecimal arithmetic
Reading:
4th / 5th Eds. Patterson and H
Pipelining: basic concepts
Doing laundry in 4 steps (each 30 minutes):
Wash
Dry
Fold
Put in closet
Each load takes 2 hours. 4 loads take 2 * 4 hours.
But can overlap steps, like an assembly line.
Updated 7/9/2013
MEMORY ADDRESSING
LOAD & STORE INSTRUCTIONS
MIPS is a load-store architecture
meaning only load & store instructions
access memory.
Since all MIPS arithmetic and logical
instructions
Chapter 3:
Pointers and arrays
Topics:
Layout of code and data in memory
Loads and stores
Registers as pointers
Translating code with arrays
Programming with strings
Reading: Patterson and Hennessy
2.
CSC 256 Machine Structures
Number Representations and Operations
Due: February 14th , 2017 @ midnight
Use the space below to complete the following questions. Make sure to show your work and to
highli
Number Systems and
Arithmetic
Anthony J Souza
San Francisco State University
Internal Representation of Integers
The way computers represent numbers in hardware.
Types of integers:
Unsigned Integer
CSC 256 Machine Structures
Number Representations and Operations
Due: February 14th, 2017 @ midnight
Use the space below to complete the following questions. Make sure to show your work and to
highlig
A
Name: Key
CSC 256Spring 2016
Midterm 1 (Section 1)February 26, 2016
100 points
sh is
ar stu
ed d
vi y re
aC s
o
ou urc
rs e
eH w
er as
o.
co
m
Instructions: You are allowed one side of one
#
# Due May 23rd, 2017 @ midnight to the Final Exam MIPS Translation Submission
submission link on ilearn
#
#
Download the base MIPS source code and C+ code from ilearn.
#
DO NOT change the name of th
B
Name: KEY
CSC 256Spring 2016
Midterm 1 (Section 1)February 26, 2016
100 points
Instructions: You are allowed one side of one page of an 8-1/2" x 11" sheet of notes that must be
submitted w
A
Name: Key
CSC 256Spring 2016
Midterm 1 (Section 1)February 26, 2016
100 points
Instructions: You are allowed one side of one page of an 8-1/2" x 11" sheet of notes that must be
submitted w
CSC 256 Spring 2016
Assignment 3 Loops
Due February 24, 2016 in class*
5 Points
* May be turned in February 22, 2016 in class for return on February 24, 2016.
Introduction
This assignment
Chapter 4:
Functions
Topics:
The stack
Function call and return
Parameter handling
Register use conventions
Reading: Patterson and Hennessy
2.8, 2.13
Chapter 4 Functions 8/2012
1
1, 2, 3
The stack
a l
Chapter 6:
Digital Logic Basics
Topics:
Combinational logic gates
Registers and memory
Flip-flops and finite state machines
Reading: P&H Appendix C
Logisim examples:
http:/userwww.sfsu.edu/~whsu/csc25
Chapter 3:
Pointers and arrays
Topics:
Layout of code and data in memory
Loads and stores
Registers as pointers
Translating code with arrays
Programming with strings
Reading: Patterson and Hennessy
2.
Chapter 1:
Integer representations in computer systems
(Review)
Topics:
Unsigned representations
Signed representations
Signed binary and hexadecimal arithmetic
Reading:
5th Ed. Patterson and Hennessy
CSC 256 Spring 2016
Assignment 2 5 points
Description
Divisibility Problem: In MIPS assembly, write a program that prompts the user for two
integers. The program then tells the user if the fir
Version A
CSC 256.01/02 Spring 2016
Name: KEY
Quiz 1 20 Points
I. (12 points) Complete the following table. Decimal Unsigned is the value if the binary
number is considered unsigned. Deci