\documentclass[noanswers,addpoints,10pt]{exam}
\usepackage[utf8]{inputenc}

\usepackage{booktabs}
\usepackage{subcaption}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{hyperref}

\usepackage{datetime}

\usepackage{enumerate}
\usepackage{enumitem}

\usepackage{xltxtra}
\usepackage{listings}
\usepackage{listings-mips}

\usepackage{graphicx}
\usepackage{makecell}
\usepackage{multicol}
\usepackage{multirow}

\usepackage{tabularx}
\usepackage{textcomp}
\usepackage{tikz}
\usetikzlibrary{arrows,automata,backgrounds,calc,decorations.pathmorphing,decorations.markings,fit,positioning,shapes.geometric}

\usepackage{fontspec}
\setmainfont{Gentium Book Basic}
\setmonofont{Comic Code}[
  Scale          = 0.85,
]

\lstset{
  basicstyle=\ttfamily,
  language=[mips]assembler,
  numbers=none,
  numberstyle=\footnotesize
}

\DeclareMathOperator{\limplies}{\Rightarrow}
\DeclareMathOperator{\liff}{{\Leftrightarrow}}
\DeclareMathOperator{\lxor}{\oplus}
\DeclareMathOperator{\qeq}{\overset{?}{=}}
\DeclareMathOperator{\modulus}{\mathbf{mod}}
\DeclareMathOperator{\even}{even}
\DeclareMathOperator{\odd}{odd}
\DeclareMathOperator{\ddiv}{|}
\DeclareMathOperator{\ndiv}{\not|}
\DeclareMathOperator{\contra}{\Rightarrow\mskip-\thinmuskip\Leftarrow}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\renewcommand{\P}[1]{\mathbb{P}(#1)}
\newcommand{\mathcheckmark}{\text{ \ding{51}}}

\DeclareMathOperator{\vowel}{vowel}
\DeclareMathOperator{\consonant}{consonant}
\DeclareMathOperator{\isprime}{prime}
\DeclareMathOperator{\equals}{equals}
\DeclareMathOperator{\divides}{divides}

\newcommand\examNumber{Worksheet - Synchronous Circuits}
\newcommand\semester{Spring 2023}
\newcommand\className{Assembly}
\newcommand\classNumber{CIS~356}
\newcommand\classFullName{\classNumber~\className}
\renewcommand{\dateseparator}{-}
\yyyymmdddate

% /classname
\pagestyle{headandfoot}
\firstpageheader{\classFullName\\\semester}{\examNumber\\~}{\today\\~}
\runningheader{\examNumber}{}{\today}

\input{gates.tikz.tex}

\begin{document}
\pointsinrightmargin

Use \emph{Digtal} to construct the following \textbf{synchronous}
gates.

\begin{questions}
\question{} Using only the built in \texttt{Byte} (or
  \texttt{Register} set to 8 bits), and whatever combinatorial gates
  you want, build a \texttt{RAM8}, a memory with 8 addressable
  bytes. The address line(s) determine which of the eight bytes are
  presented on \lstinline{Q} and which byte will latch \lstinline{D}
  (on a rising clock signal while \lstinline{en} is asserted).

\vspace{1cm}
\begin{tikzpicture}
    \draw pic {ram8};
  \end{tikzpicture}
\question{}   Using as many of your \texttt{RAM8} as you like, and whatever
  combinatorial gates you need, build a \texttt{RAM64}, a memory with
  64 addressable bytes. The address, load and clock serve the same
  sort of purpose as in \texttt{RAM8}. \textbf{Note:} think about the
  \emph{number} of address lines coming in to the \lstinline{RAM64}
  and \emph{how many} each \lstinline{RAM8} needs to do its job.

\vspace{1cm}
  \begin{tikzpicture}
    \draw pic {ram64};
  \end{tikzpicture}
\end{questions}

\textbf{Deliverables:} When all the circuits are tested and working,
put them into a \lstinline{git} repository (no need for a
\lstinline{README} here) and submit them through \lstinline{Gitea} at
\url{https:cs-devel.potsdam.edu}.
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
