$15
Q 1) If we freeze one machine, copy all state (memory, register file, PC, flags register) to another machine, will both machines give the same result? What if the second machine has a different design, but implements the same ISA? What if the second machine has a different ISA?
Q 2) Consider the following recursive function foo foo(n) {
If n == 2
Return 2 If n == 1
Return 1
Return foo(n-1) + foo(n-2)
}
Suppose we make a call foo(5) from the main() function. What is the maximum number of activation blocks seen in the stack?
(Consider the activation block for main() being at the bottom of the stack).