Write a pseudocode for the multiplication 'a la russe', which was presented in the class without the use of arrays. Assume that the algorithm is to be executed on a computer in which the multiplication of integers is not defined. Trace the execution of your pseudocode for Function RUSSE, when numbers 24 and 13 are multiplied according to your pseudocode. Tracing will look, as an example, meaning, I have to show all the steps, one by one, according to your pseudocode, not what you see in the example.
In short, design the pseudocode for this RUSSE algorithm without using arrays. I do not have to declare variables, but we have two variables. Provide tracing or how the variables behave within the loop.
Example from classroom:
Function Russe(A,B) {Russe computes the product of integers A and B}
variables x, y
x[1] <= a
x[2] <= b
i <= 2
while x[i] > 1 do
x[i+1] <= x[i] div 2
y[i+1] <= y[i] + y[i]
i <= i + 1
end-while
prod <= 0
while i > 0 do
if x[i] is odd then
prod <= prod + y[i]
end-if
i <= i - 1
end-while
return prod
end-RUSSE