Skip to content

Commit

Permalink
Spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipen committed Nov 6, 2023
1 parent 28588c8 commit 6d00c89
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hw3.tex
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,14 @@

% Task: Subtractor.
\item A \textit{half subtractor} is a circuit that has two bits as input and produces as output a difference bit and a borrow. A \textit{full subtractor} is a circuit that has two bits and a borrow as input, and produces as output a difference bit and a borrow.

\begin{subtasks}
\item Construct a circuit for a half subtractor using AND gates, OR gates, and inverters.

\item Construct a circuit for a full subtractor using half subtractors and NAND gates.
\item Construct a circuit that computes the \textit{saturating} difference of two four-bit integers $(x_3 x_2 x_1 x_0)_2$ and $(y_3 y_2 y_1 y_0)_2$ using half/full subtractors, AND gates, OR gates, and inverters. When $x \geq y$, the output bits $d_3, \dots, d_0$ should represent $d = x - y$, and when $x < y$, the output must be zero.

\item Construct a circuit that computes the \textit{saturating} difference of two four-bit integers $(x_3 x_2 x_1 x_0)_2$ and $(y_3 y_2 y_1 y_0)_2$ using half/full subtractors, AND gates, OR gates, and inverters.
When $x \geq y$, the output bits $d_3, \dots, d_0$ should represent $d = x - y$, and when $x < y$, the output must be zero.
\end{subtasks}


Expand Down

0 comments on commit 6d00c89

Please sign in to comment.