16.482 / 16.561: Computer Architecture and Design
Fall 2013
Homework #4 Solution
1. (40 points) A 5-stage pipeline contains four staging registers, one between each pair
of stages in the datapath; these registers are used to hold information about each
in

16.482 / 16.561: Computer Architecture and Design
Fall 2013
Homework #1 Solution
1. (30 pts) Given the following sequence of C operations, write an assembly language
program for each of the four ISA classes we discussed: accumulator, stack, memorymemory,

16.482 / 16.561: Computer Architecture and Design
Fall 2013
Homework #2 Solution
1. (50 points) For each part of the following question, assume the following initial state.
Note that your answers for each sequence should start with the values belowyour
an

16.482 / 16.561: Computer Architecture and Design
Fall 2013
Homework #8 Solution
1. RAID (40 points) In this problem, you will deal with reliability issues in a RAID
system. Assume we have a system in which each disk contains 60 GB, with a peak
sequential

16.482 / 16.561: Computer Architecture and Design
Fall 2013
Homework #7 Solution
1. Virtual memory (30 points) Answer the following questions about a process that uses
the page table below:
U
U
Virtual
page #
0
1
2
3
4
5
6
7
Valid bit
1
1
0
1
0
1
0
1
Refe

16.482 / 16.561: Computer Architecture and Design
Fall 2013
Homework #6 Solution
1. (30 points) For each of the following memory hierarchies, calculate the average
memory access time. If you end up with a fractional number of cycles, round up
there isnt m

16.482 / 16.561: Computer Architecture and Design
Fall 2013
Homework #3 Solution
1. (50 points) For the examples below, show how binary multiplication would proceed
using (i) the pencil and paper method (the most basic method discussed in class), (ii)
the

16.482 / 16.561: Computer Architecture and Design
Summer 2014
Midterm Exam Solution
1. (16 points) Evaluating instructions
For each part of the following question, assume the following initial state. Note that your
answers to each part should use the valu

16.482 / 16.561: Computer Architecture and Design
Spring 2014
Homework #8 Solution
1. RAID (40 points) In this problem, you will deal with reliability issues in a RAID
system. Assume we have a system in which each disk contains 60 GB, with a peak
sequenti

16.482 / 16.561: Computer Architecture and Design
Spring 2014
Homework #5 Solution
1. Multithreading (60 points) Given the three threads shown below, determine how long
they take to execute using (a) fine-grained multithreading, (b) coarse-grained
multith

16.482 / 16.561: Computer Architecture and Design
Spring 2014
Homework #7 Solution
1. Virtual memory (30 points) Answer the following questions about a process that uses
the page table below:
U
U
Virtual
page #
0
1
2
3
4
5
6
7
Valid bit
1
1
0
1
0
1
0
1
Re

16.482 / 16.561: Computer Architecture and Design
Spring 2014
Homework #6 Solution
1. (50 points) You are given a system which has a 16-byte, write-back cache with 4-byte
blocks. The cache is direct-mapped.
a. (10 points) If each address uses 8 bits, what

16.482 / 16.561: Computer Architecture and Design
Spring 2014
Homework #4 Solution
(See assignment for full problem statement, description of nested loops, etc.)
1. Dependences (40 points) Identify all true dependences, anti-dependences, and output
depend

16.482 / 16.561: Computer Architecture and Design
Fall 2013
Midterm Exam Solution
1. (14 points) Computer performance
We use two compilers to generate machine code for the same program, on the same processor,
which has a 10 ns cycle time. The instruction

16.482 / 16.561: Computer Architecture and Design
Spring 2014
Homework #2 Solution
1. (20 points) Compute the result of each floating-point arithmetic arithmetic operation below,
in which each of the values is encoded in single-precision IEEE floating-poi

16.482 / 16.561: Computer Architecture and Design
Spring 2014
Homework #1 Solution
1. (30 points) For each part of the following question, assume the following initial state.
Note that your answers to each part should use the values belowyour answer to
pa

16.482 / 16.561: Computer Architecture and Design
Spring 2014
Homework #3 Solution
1. Branch history tables (50 points) Say you are executing a program that contains the
following high-level code snippet:
A[8] = cfw_3, 7, 4, 9, 2, 1, 8, 4;
for (i = 0; i <

16.482 / 16.561: Computer Architecture and Design
Fall 2014
Homework #9 Solution
1. RAID (40 points) You are working with a 5-disk RAID array that contains a total of 15
sectors; the exact sector configuration depends on the RAID level used. In all cases,

16.482 / 16.561: Computer Architecture and Design
Fall 2014
Homework #6 Solution
All problems deal with the following three threads. Note that you must determine the number of
stall cycles between dependent instructions based on the instruction latencies

16.482 / 16.561: Computer Architecture and Design
Fall 2014
Homework #3 Solution
1. (20 points) A 5-stage pipeline contains four staging registers, one between each pair of
stages in the datapath; these registers are used to hold information about each in

16.482 / 16.561: Computer Architecture and Design
Fall 2014
Homework #7 Solution
1. (50 points) For each of the following memory hierarchies, calculate the average memory
access time. If you end up with a fractional number of cycles, round upthere isnt mu

16.482 / 16.561: Computer Architecture and Design
Fall 2014
Homework #5 Solution
(See assignment for full problem statement, description of nested loops, etc.)
1. Dependences (40 points) Identify all true dependences, anti-dependences, and output
dependen

16.482 / 16.561: Computer Architecture and Design
Fall 2014
Homework #2 Solution
1. (10 points) Show how the refined multiply hardware (slide #22 from Lec. 2) multiplies the
8-bit values 55 and 13, using an approach similar to the one demonstrated in lect

16.482 / 16.561: Computer Architecture and Design
Fall 2014
Homework #4 Solution
1. Branch history tables (50 points) Say you are executing a program that contains the
following high-level code snippet:
A[8] = cfw_7, 4, 3, 2, 5, 1, 6, 10;
for (i = 0; i <

16.482 / 16.561: Computer Architecture and Design
Fall 2014
Homework #1 Solution
For each instruction sequence below, assume the following initial state. Note that your
answers to each part should use the values belowyour answer to part (2), for example,