Exercise 2 ========== #. Complete the 8-bit, unsigned addition given below. Show all the steps in both hexadecimal (left) and binary (right). .. math:: \begin{aligned} &\textsf{hex} \quad & &\textsf{binary}\\ &\texttt{AF} & &\square\square\square\square\square\square\square\square\\ +&\texttt{72} &+&\square\square\square\square\square\square\square\square\\ \hline &\!\!\square\square &&\square\square\square\square\square\square\square\square \end{aligned} Is there an overflow? #. Suppose we want to find an iterative algorithm for raising the number :math:`\mathsf{a}` to a rational power---i.e., for computing :math:`\mathsf{a^{p/q}}` with :math:`\mathsf{p}` and :math:`\mathsf{q}` integer. Convince yourself that the sequence defined by .. math:: \begin{aligned} \mathsf{x_0} & := \mathsf{1}\\ \mathsf{x_{n+1}} & := \mathsf{\Bigl(1-\frac{1}{q}\Bigr)x_n} + \mathsf{\frac{a^p}{q}x_n^{1-q}} \end{aligned} has :math:`\mathsf{a^{p/q}}` as its limit. I suggest you proceed in this way: suppose that :math:`\mathsf{x_n}` is a good guess to the answer; construct a better guess :math:`\mathsf{x_{n+1}} = \mathsf{x_n} + \mathsf{\delta x} \approx \mathsf{a^{p/q}}`; solve for :math:`\mathsf{\delta x}` to lowest order in a series expansion. #. Find the value of :math:`\mathsf{b}` such that the functions .. math:: \begin{aligned} \mathsf{t(x)} &= \mathsf{x} - \mathsf{\frac{1}{3}x^3} + \mathsf{\frac{2}{15}x^5}\\ \textsf{and} \ \ \mathsf{r(x)} & = \mathsf{\frac{15x+x^3}{15+b x^2}} \end{aligned} agree to sixth order. Plot the functions :math:`\mathsf{t(x)}`, :math:`\mathsf{r(x)}`, and :math:`\mathsf{tanh}\,\mathsf{x}` in the range :math:`\mathsf{0} \le \mathsf{x} \le \mathsf{2}`. Also, plot the differences :math:`\mathsf{t(x)}-\textsf{tanh}\,\mathsf{x}` and :math:`\mathsf{r(x)} - \textsf{tanh}\,\mathsf{x}` with the log scale on the y-axis. How do they compare? What do :math:`\mathsf{t(x)}` and :math:`\mathsf{r(x)}` represent?