Number of cache lines in cache memory = $(16384/32)=512$
\subsection{Exercise 1.2}
\subsubsection{Byte:}
\paragraph{}
Bytes per word = $32 bits /8 bits =4$
\paragraph{}
Number of \emph{Byte} bits = $log_2(4)=2 bits$
\subsubsection{Word:}
\paragraph{}
Words per cache line = $32 bytes /4 bytes =8$
\paragraph{}
Number of \emph{Word} bits = $log_2(8)=3 bits$
\subsubsection{Line:}
\paragraph{}
Number of \emph{Line} bits = $log_2(512)=9 bits$
\subsubsection{Tag:}
\paragraph{}
Number of \emph{Tag} bits = $32 bits -9 bits -3 bits -2 bits=18 bits$
\subsection{Exercise 1.3}
\subsubsection{Byte and Word:}
\paragraph{}
The number of \emph{Byte} and \emph{Word} bits do not change.
\subsubsection{Line:}
\paragraph{}
Number of sets = 4
\paragraph{}
Number of \emph{Set} bits = $log_2(4)=2 bits$
\subsubsection{Tag:}
\paragraph{}
Number of \emph{Tag} bits = $32 bits -2 bits -3 bits -2 bits=25 bits$
\section{Exercise 2}
\subsection{Exercise 2.1}
\paragraph{}
The floating point standard normalizes every binary number as 1.XXXX, storing only the fraction so that it can save 1 bit of memory by simply assuming, from the normalized format, that the first bit before the comma is always a 1.
It also ranges from $1.0_2\ (1_{10})\ to\ 1.1111... (almost\ 2_{10})$. \\
The reason for having three different formats for precision is, indeed, to have more precise numbers to work with. This is especially useful with big positive numbers as, sometimes, more bits can be used to represent them since one more digit in a big number makes much more difference than in a small number.
\subsection{Exercise 2.2}
\paragraph{}
Underflow would usually result in a value of 0 or NaN. \\
But, with denormalization, instead of a ``flush to 0", you get a gradual loss of precision for values that go to 0.
On the other hand, denormalized numbers are not a valid solution to overflow as the gradual loss of precision towards infinity doesn't apply.
\subsection{Exercise 2.3}
\paragraph{A) Conversion of 01000001010110000000000000000000 to decimal:}
\begin{itemize}
\item[] Sign bit: 0
\item[] Exponent bits: 10000010
\item[] Mantissa bits: 1.10110000000000000000000
\end{itemize}
The exponent bits map to $+3$ and the mantissa bits evaluate to $2^{-1}$,$\ 2^{-3}\ $and$\ 2^{-4}$.\\
We then multiply the mantissa by the exponent and we get $1.10110000000000000000000\ *\ 2^3=1101.10000000000000000000$.\\