Consider the following algorithm that inputs X and N, and outputs P.
(a) Determine how many times multiplication is performed when the algorithm is executed. [1]
(b) Construct a trace table for the algorithm when X=2 and N=4. Use the following headings in your table.
(c) State the purpose of the algorithm. [1]