An algorithm is required to multiply an input integer number by 5. Two different designs are proposed.
Figure 1
result ← number LEFTSHIFT 2
result ← result + number
Figure 2
result ← 0
FOR counter ← 1 TO 5
result ← result + number
ENDFOR
Explain why the algorithm shown in Figure 1 is more efficient than the algorithm shown in Figure 2.
15 exam-style questions on AQA GCSE Computer Science Efficiency of algorithms. Each one has a worked solution and a mark scheme showing where the marks go.