explain with sketch out the Guard bits and Truncation
Answers
Answer:
To retain maximum accuracy, all extra bits during operation (called guard bits) are kept (e.g., multiplication). If we assume $n=3$ bits are used in final representation of a number, $n=3$ extra guard bits are kept during operation. By the end of the operation, the resulting $2n=6$ bits need to be truncated to $n=3$ bits by one of the three methods.
Chopping: simply drop all $n=3$ guard bits
\begin{displaymath}\{0.b_{-1}b_{-2}b_{-3}000 \sim 0.b_{-1}b_{-2}b_{-3}111 \}
\rightarrow 0.b_{-1}b_{-2}b_{-3} \end{displaymath}
We define the truncation error as:
\begin{displaymath}E=\mbox{truncation error} \stackrel{\triangle}{=}
\mbox{actual value}-\mbox{truncated value}
\end{displaymath}
We see that the truncation error of chopping is
\begin{displaymath}0 \le E \le 0.000111 < 0.001 = 2^{-n} \end{displaymath}
As $E$ is always greater than 0, we say this truncation error is biased.
Von Neumann Rounding: If at least one of the guard bits is 1, set $LSB=1$ (no matter whether it is originally 0 or 1), otherwise do nothing.