\iffalse

INSTRUCTIONS: (if this is not ps1, use the right file name)

  Clip out the ********* INSERT HERE ********* bits below and insert
appropriate TeX code.  Once you are done with your file, run

  ``latex template.tex''

from the Athena shell.  If your TeX code is clean, the latex will exit
back to a prompt.  Once this is done, run

  ``dvips template.dvi -o template.ps''

which should print your file to the nearest printer.  There will be
residual files called ps1.log, ps1.aux, and ps1.dvi.  All these can be
deleted, but do not delete ps1.tex.

\fi
\documentclass[11pt]{article}
\usepackage{amsfonts}
\usepackage{latexsym}
\setlength{\oddsidemargin}{.25in}
\setlength{\evensidemargin}{.25in}
\setlength{\textwidth}{6in}
\setlength{\topmargin}{-0.4in}
\setlength{\textheight}{8.5in}

\newcommand{\handout}[5]{
   \renewcommand{\thepage}{5-4-\arabic{page}}
   \noindent
   \begin{center}
   \framebox{
      \vbox{
    \hbox to 5.78in { {\bf 6.823 Computer Architecture} \hfill #2 }
       \vspace{4mm}
       \hbox to 5.78in { {\Large \hfill #5  \hfill} }
       \vspace{2mm}
       \hbox to 5.78in { {\it #3 \hfill #4} }
      }
   }
   \end{center}
   \vspace*{4mm}
}

\newcommand{\ho}[5]{\handout{#1}{#2}{Instructor:
#3}{Teaching Assistant: #4}{Handout #1: #5}}
\newcommand{\al}{\alpha}
\newcommand{\Z}{\mathbb Z}

\begin{document}
\handout{P5}{DUE: 4/29/2002}{Problem Set 5}
{Instructors: Krste Asanovic, Srinivas Devadas}
{Group 18: Timothy Danford, Kilian Pohl, Bryan Russell}


% Problem 4
\section*{Problem 4}
\bigskip 
{\bf (a)}
This sequence takes 18 cycles to execute:\\

\begin{center}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline
1 & F & & & & & & & & & & & \\ \hline
2 & D & & & & F & & & & & & & \\ \hline
3 & R & & & & D & & & & F & & & \\ \hline
4 & X1 & R & & & & & & & & & & \\ \hline
5 & X2 & X1 & R & & & & & & & & & \\ \hline
6 & W & X2 & X1 & R & & & & & & & & \\ \hline
7 & & W & X2 & X1 & & & & & & & & \\ \hline
8 & & & W & X2 & & & & & & & & \\ \hline
9 & & & & W & R & & & & D & & & \\ \hline
10 & & & & & X1 & R & & & & & & \\ \hline
11 & & & & & X2 & X1 & R & & & & & \\ \hline
12 & & & & & W & X2 & X1 & R & & & & \\ \hline
13 & & & & & & W & X2 & X1 & & & & \\ \hline
14 & & & & & & & W & X2 & & & & \\ \hline
15 & & & & & & & & W & & & & \\ \hline
16 & & & & & & & & & R & & & \\ \hline
17 & & & & & & & & & X1 & R & & \\ \hline
18 & & & & & & & & & X2 & X1 & R & \\ \hline
19 & & & & & & & & & X3 & X2 & X1 & R\\ \hline
20 & & & & & & & & & W & X3 & X2 & X1\\ \hline
21 & & & & & & & & & & W & X3 & X2\\ \hline
22 & & & & & & & & & & & W & X3\\ \hline
23 & & & & & & & & & & & & W\\ \hline
\end{tabular}
\end{center}

\bigskip\noindent
{\bf (b)}
This sequence takes 13 cycles to execute:\\

\begin{center}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline
1 & F & & & & & & & & & & & \\ \hline
2 & D & & & & F & & & & & & & \\ \hline
3 & R & & & & D & & & & F & & & \\ \hline
4 & X1 & R & & & & & & & & & & \\ \hline
5 & X2 & X1 & R & & & & & & & & & \\ \hline
6 & W & X2 & X1 & R & & & & & & & & \\ \hline
7 & & W & X2 & X1 & R & & & & D & & & \\ \hline
8 & & & W & X2 & X1 & R & & & & & & \\ \hline
9 & & & & W & X2 & X1 & R & & & & & \\ \hline
10 & & & & & W & X2 & X1 & R & & & & \\ \hline
11 & & & & & & W & X2 & X1 & R & & & \\ \hline
12 & & & & & & & W & X2 & X1 & R & & \\ \hline
13 & & & & & & & & W & X2 & X1 & R & \\ \hline
14 & & & & & & & & & X3 & X2 & X1 & R\\ \hline
15 & & & & & & & & & W & X3 & X2 & X1\\ \hline
16 & & & & & & & & & & W & X3 & X2\\ \hline
17 & & & & & & & & & & & W & X3\\ \hline
18 & & & & & & & & & & & & W\\ \hline
\end{tabular}
\end{center}

\bigskip\noindent
{\bf (c)}
This sequence takes 7 cycles to execute:\\

\begin{center}
\begin{tabular}{|c|c|c|c|c|c|c|} \hline
1 & F & & & & & \\ \hline
2 & D & & F & & & \\ \hline
3 & R & & D & & F & \\ \hline
4 & X1 & R & & & & \\ \hline
5 & X2 & X1 & R & & D & \\ \hline
6 & W & X2 & X1 & R & & \\ \hline
7 & & W & X2 & X1 & R & \\ \hline
8 & & & W & X2 & X1 & R\\ \hline
9 & & & & W & X2 & X1\\ \hline
10 & & & & & X3 & X2\\ \hline
11 & & & & & W & X3\\ \hline
12 & & & & & & W\\ \hline
\end{tabular}
\end{center}

\end{document}



